Compare commits
119 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66e8daedec | ||
|
|
a2935f61ce | ||
|
|
2fb91f2390 | ||
|
|
01a4ad3dea | ||
|
|
82f501db45 | ||
|
|
9a527a0973 | ||
|
|
923c05a70a | ||
|
|
f188eb2757 | ||
|
|
847841c181 | ||
|
|
a14c036ffb | ||
|
|
3eeb1c8ff2 | ||
|
|
8091c18e7d | ||
|
|
56de9e29e1 | ||
|
|
391f089c93 | ||
|
|
acc592b251 | ||
|
|
0cf76d5270 | ||
|
|
df5b7c2b43 | ||
|
|
e61040d1e5 | ||
|
|
8ea2e21eb6 | ||
|
|
4636e76d76 | ||
|
|
803bda060b | ||
|
|
3e441699c9 | ||
|
|
326f22714f | ||
|
|
b3585374fe | ||
|
|
ccf993c077 | ||
|
|
e4efb00c5c | ||
|
|
44e51d8629 | ||
|
|
a08caa0d16 | ||
|
|
e4ba4d4277 | ||
|
|
4c08d18a6f | ||
|
|
ff1ffcdfbe | ||
|
|
6dcf23b6c8 | ||
|
|
6db71f1c36 | ||
|
|
e14436efd7 | ||
|
|
70f3ccf445 | ||
|
|
e1ceffac89 | ||
|
|
3852419581 | ||
|
|
266a82b74a | ||
|
|
3626b5fa07 | ||
|
|
67b3937c75 | ||
|
|
eeabb41dd6 | ||
|
|
884e67c5e2 | ||
|
|
dd5726acf5 | ||
|
|
2033aa88a9 | ||
|
|
1879d58994 | ||
|
|
782e6a6582 | ||
|
|
e2f2c82ada | ||
|
|
57423952bf | ||
|
|
f106ab2738 | ||
|
|
71430b610f | ||
|
|
a66c4e48ac | ||
|
|
2f32c4d775 | ||
|
|
5b23355b93 | ||
|
|
c6ec7a0208 | ||
|
|
c8b07494c3 | ||
|
|
aa893193de | ||
|
|
ccf33456d9 | ||
|
|
3a9de1cc98 | ||
|
|
543a683b6c | ||
|
|
317b3759c8 | ||
|
|
4b1af70d9b | ||
|
|
27cc2cee02 | ||
|
|
33fe5a6189 | ||
|
|
2f91c6da96 | ||
|
|
fff5416b23 | ||
|
|
c622092092 | ||
|
|
60af568958 | ||
|
|
7c760fc0f5 | ||
|
|
aa77486a6a | ||
|
|
186e69d9a5 | ||
|
|
689c73d0bd | ||
|
|
448c5f5ca5 | ||
|
|
8bc27709da | ||
|
|
4f0ec9b01a | ||
|
|
dec2f677ef | ||
|
|
1341f6f2bd | ||
|
|
306ebea396 | ||
|
|
dc5a91f713 | ||
|
|
8724b50406 | ||
|
|
86d1d4d944 | ||
|
|
428d11a55d | ||
|
|
6d6c996162 | ||
|
|
9dd0986d18 | ||
|
|
430163f6a1 | ||
|
|
175b91bdbb | ||
|
|
4f10fb0226 | ||
|
|
e2e8537a01 | ||
|
|
340d245cbd | ||
|
|
f67fdce869 | ||
|
|
06fa4569a8 | ||
|
|
601b097dc2 | ||
|
|
2bb7ef3935 | ||
|
|
8c2c2e5aa0 | ||
|
|
ac911768d8 | ||
|
|
bba5549405 | ||
|
|
1925ce1a84 | ||
|
|
2520570fa6 | ||
|
|
0510b2f3c9 | ||
|
|
cd01d40d54 | ||
|
|
66ec20095d | ||
|
|
1a01dde0cd | ||
|
|
48bc9baacb | ||
|
|
221689cd84 | ||
|
|
19e09fbedc | ||
|
|
4e65dbdfbb | ||
|
|
ab564d0d3c | ||
|
|
80262bf100 | ||
|
|
80adca9cf3 | ||
|
|
c3fcc05859 | ||
|
|
6d48fb7ef0 | ||
|
|
8300ab0d36 | ||
|
|
69b1610428 | ||
|
|
8f448c6ca5 | ||
|
|
a9b48d9faf | ||
|
|
15ee0e06d4 | ||
|
|
c88daca40b | ||
|
|
15d2947c33 | ||
|
|
16b387b796 | ||
|
|
9c23e3284f |
2
.gitignore
vendored
@ -41,3 +41,5 @@
|
|||||||
/bin
|
/bin
|
||||||
/Properties
|
/Properties
|
||||||
*.csproj
|
*.csproj
|
||||||
|
|
||||||
|
/.idea
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
|
using Decimation.Lib.Buffs;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
|
||||||
|
|
||||||
namespace Decimation.Content.Buffs.Buffs
|
namespace Decimation.Content.Buffs.Buffs
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
using Terraria.ID;
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
|
||||||
|
|
||||||
namespace Decimation.Content.Buffs.Buffs
|
namespace Decimation.Content.Buffs.Buffs
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
using Terraria.ModLoader;
|
using Terraria;
|
||||||
using Terraria.DataStructures;
|
|
||||||
|
|
||||||
namespace Decimation.Content.Buffs.Buffs
|
namespace Decimation.Content.Buffs.Buffs
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
|
using Terraria;
|
||||||
|
|
||||||
namespace Decimation.Content.Buffs.Buffs
|
namespace Decimation.Content.Buffs.Buffs
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
using Terraria.ModLoader;
|
using Terraria;
|
||||||
using Terraria.DataStructures;
|
|
||||||
|
|
||||||
namespace Decimation.Content.Buffs.Buffs
|
namespace Decimation.Content.Buffs.Buffs
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
|
using Decimation.Content.Projectiles.Item.Weapon;
|
||||||
|
using Decimation.Lib.Buffs;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.Xna.Framework.Input;
|
using Decimation.Lib.Buffs;
|
||||||
|
using Microsoft.Xna.Framework.Input;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
using Terraria.ID;
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
|
||||||
|
|
||||||
namespace Decimation.Content.Buffs.Buffs
|
namespace Decimation.Content.Buffs.Buffs
|
||||||
{
|
{
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 474 B |
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Decimation.Lib.Buffs;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
|
using Decimation.Lib.Buffs;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
|
||||||
|
|
||||||
namespace Decimation.Content.Buffs.Buffs
|
namespace Decimation.Content.Buffs.Buffs
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
|
||||||
namespace Decimation.Content.Buffs.Debuffs
|
namespace Decimation.Content.Buffs.Debuffs
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
using Terraria.ID;
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
|
||||||
|
|
||||||
namespace Decimation.Content.Buffs.Debuffs
|
namespace Decimation.Content.Buffs.Debuffs
|
||||||
{
|
{
|
||||||
@ -24,6 +23,7 @@ namespace Decimation.Content.Buffs.Debuffs
|
|||||||
{
|
{
|
||||||
player.lifeRegen = 0;
|
player.lifeRegen = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
player.lifeRegenTime = 0;
|
player.lifeRegenTime = 0;
|
||||||
player.lifeRegen -= 3;
|
player.lifeRegen -= 3;
|
||||||
|
|
||||||
@ -36,6 +36,7 @@ namespace Decimation.Content.Buffs.Debuffs
|
|||||||
{
|
{
|
||||||
npc.lifeRegen = 0;
|
npc.lifeRegen = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
npc.lifeRegenExpectedLossPerSecond += 3;
|
npc.lifeRegenExpectedLossPerSecond += 3;
|
||||||
npc.lifeRegen -= 3;
|
npc.lifeRegen -= 3;
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 537 B |
@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 575 B |
@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 393 B |
@ -1,6 +1,5 @@
|
|||||||
using System;
|
using Decimation.Lib.Buffs;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Buffs.Debuffs
|
namespace Decimation.Content.Buffs.Debuffs
|
||||||
@ -8,7 +7,10 @@ namespace Decimation.Content.Buffs.Debuffs
|
|||||||
internal class Hyperthermic : DecimationBuff
|
internal class Hyperthermic : DecimationBuff
|
||||||
{
|
{
|
||||||
protected override string DisplayName => "Hyperthermic!";
|
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%";
|
|
||||||
|
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;
|
public override bool Debuff => true;
|
||||||
|
|
||||||
protected override void Init()
|
protected override void Init()
|
||||||
@ -20,13 +22,13 @@ namespace Decimation.Content.Buffs.Debuffs
|
|||||||
|
|
||||||
public override void Update(Player player, ref int buffIndex)
|
public override void Update(Player player, ref int buffIndex)
|
||||||
{
|
{
|
||||||
player.statDefense = (int)(player.statDefense * 0.90f);
|
player.statDefense = (int) (player.statDefense * 0.90f);
|
||||||
player.moveSpeed *= 0.95f;
|
player.moveSpeed *= 0.95f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(NPC npc, ref int buffIndex)
|
public override void Update(NPC npc, ref int buffIndex)
|
||||||
{
|
{
|
||||||
npc.defense = (int)(npc.defense * 0.90f);
|
npc.defense = (int) (npc.defense * 0.90f);
|
||||||
npc.velocity *= 0.95f;
|
npc.velocity *= 0.95f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -35,7 +37,8 @@ namespace Decimation.Content.Buffs.Debuffs
|
|||||||
{
|
{
|
||||||
public override bool CanUseItem(Item item, Player player)
|
public override bool CanUseItem(Item item, Player player)
|
||||||
{
|
{
|
||||||
return !(player.HasBuff(ModContent.BuffType<Hyperthermic>()) && item.healMana > 0);
|
if (player.HasBuff(ModContent.BuffType<Hyperthermic>()) && item.healMana > 0) return false;
|
||||||
|
return base.CanUseItem(item, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 486 B |
@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 471 B |
@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 485 B |
@ -1,4 +1,5 @@
|
|||||||
using Terraria;
|
using Decimation.Lib.Buffs;
|
||||||
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ namespace Decimation.Content.Buffs.Debuffs
|
|||||||
{
|
{
|
||||||
return !(item.UseSound != null && item.useStyle == 2);
|
return !(item.UseSound != null && item.useStyle == 2);
|
||||||
}
|
}
|
||||||
return true;
|
return base.CanUseItem(item, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
using Decimation.Lib.Buffs;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
using Terraria.DataStructures;
|
using Terraria.DataStructures;
|
||||||
@ -41,7 +42,7 @@ namespace Decimation.Content.Buffs.Debuffs
|
|||||||
{
|
{
|
||||||
return !(item.UseSound != null && item.useStyle == 2);
|
return !(item.UseSound != null && item.useStyle == 2);
|
||||||
}
|
}
|
||||||
return true;
|
return base.CanUseItem(item, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 577 B |
36
Content/Debug/DebugAI.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using Decimation.Lib.Items;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Debug
|
||||||
|
{
|
||||||
|
public class DebugAIItem : DecimationItem
|
||||||
|
{
|
||||||
|
public override string Texture => "Terraria/Item_" + ItemID.Star;
|
||||||
|
protected override string ItemName => "Debug AI";
|
||||||
|
|
||||||
|
protected override void Init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool UseItem(Player player)
|
||||||
|
{
|
||||||
|
DebugAI.debugging = !DebugAI.debugging;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DebugAI : GlobalNPC
|
||||||
|
{
|
||||||
|
public static bool debugging;
|
||||||
|
|
||||||
|
public override bool PreAI(NPC npc)
|
||||||
|
{
|
||||||
|
if (debugging) return false;
|
||||||
|
|
||||||
|
return base.PreAI(npc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
38
Content/Debug/DebugHitbox.cs
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
using Decimation.Lib.Items;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Debug
|
||||||
|
{
|
||||||
|
public class DebugHitboxItem : DecimationItem
|
||||||
|
{
|
||||||
|
public override string Texture => "Terraria/Item_" + ItemID.Acorn;
|
||||||
|
protected override string ItemName => "Debug Hitbox";
|
||||||
|
|
||||||
|
protected override void Init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool UseItem(Player player)
|
||||||
|
{
|
||||||
|
DebugHitbox.debugging = !DebugHitbox.debugging;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class DebugHitbox : GlobalNPC
|
||||||
|
{
|
||||||
|
public static bool debugging;
|
||||||
|
|
||||||
|
public override bool PreDraw(NPC npc, SpriteBatch spriteBatch, Color drawColor)
|
||||||
|
{
|
||||||
|
if (debugging) npc.DrawDebugHitbox(spriteBatch);
|
||||||
|
|
||||||
|
return base.PreDraw(npc, spriteBatch, drawColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
21
Content/Debug/DebugSword.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using Decimation.Lib.Items;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Debug
|
||||||
|
{
|
||||||
|
public class DebugSword : DecimationWeapon
|
||||||
|
{
|
||||||
|
protected override string ItemName => "Debug Sword";
|
||||||
|
protected override int Damages => 9999999;
|
||||||
|
|
||||||
|
protected override void InitWeapon()
|
||||||
|
{
|
||||||
|
item.width = 168;
|
||||||
|
item.height = 168;
|
||||||
|
item.useTime = 30;
|
||||||
|
item.useAnimation = 30;
|
||||||
|
item.crit = 50;
|
||||||
|
item.autoReuse = false;
|
||||||
|
item.knockBack = 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Content/Debug/DebugSword.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
25
Content/Debug/DebugUtils.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
|
using Terraria;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Debug
|
||||||
|
{
|
||||||
|
public static class DebugUtils
|
||||||
|
{
|
||||||
|
public static void DrawDebugHitbox(this NPC npc, SpriteBatch spriteBatch)
|
||||||
|
{
|
||||||
|
Texture2D debugTexture = Decimation.Instance.GetTexture("Content/Debug/pixel");
|
||||||
|
|
||||||
|
spriteBatch.Draw(
|
||||||
|
debugTexture,
|
||||||
|
new Rectangle(
|
||||||
|
(int) (npc.position.X - Main.screenPosition.X),
|
||||||
|
(int) (npc.position.Y - Main.screenPosition.Y),
|
||||||
|
(int) (npc.width * npc.scale),
|
||||||
|
(int) (npc.height * npc.scale)
|
||||||
|
),
|
||||||
|
new Color(255, 0, 0, 20)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Content/Debug/pixel.png
Normal file
|
After Width: | Height: | Size: 72 B |
@ -1,22 +1,23 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Decimation.Content.Items.Tools.Axes;
|
||||||
|
using Decimation.Content.NPCs.Arachnus;
|
||||||
|
using Decimation.Content.NPCs.DuneWyrm;
|
||||||
|
using Decimation.Content.NPCs.DuneWyrm.AncientTombCrawler;
|
||||||
|
using Decimation.Content.UI;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
|
using Terraria.Localization;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
using Decimation.Content.NPCs.Arachnus;
|
|
||||||
using Decimation.Content.NPCs.AncientDuneWorm;
|
|
||||||
using Decimation.Content.UI;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Decimation.Lib.Util;
|
|
||||||
using Terraria.UI;
|
using Terraria.UI;
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
|
|
||||||
namespace Decimation.Content
|
namespace Decimation.Content
|
||||||
{
|
{
|
||||||
public class Decimation : Mod
|
public class Decimation : Mod
|
||||||
{
|
{
|
||||||
public static Decimation Instance { set; get; }
|
|
||||||
|
|
||||||
public static AmuletSlotState amuletSlotState;
|
public static AmuletSlotState amuletSlotState;
|
||||||
private UserInterface amuletSlotInterface;
|
private UserInterface amuletSlotInterface;
|
||||||
|
|
||||||
@ -26,7 +27,7 @@ namespace Decimation.Content
|
|||||||
{
|
{
|
||||||
Instance = this;
|
Instance = this;
|
||||||
|
|
||||||
Properties = new ModProperties()
|
Properties = new ModProperties
|
||||||
{
|
{
|
||||||
Autoload = true,
|
Autoload = true,
|
||||||
AutoloadGores = true,
|
AutoloadGores = true,
|
||||||
@ -36,6 +37,8 @@ namespace Decimation.Content
|
|||||||
References.mod = this;
|
References.mod = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Decimation Instance { set; get; }
|
||||||
|
|
||||||
public override void Load()
|
public override void Load()
|
||||||
{
|
{
|
||||||
if (!Main.dedServ)
|
if (!Main.dedServ)
|
||||||
@ -93,74 +96,79 @@ namespace Decimation.Content
|
|||||||
Mod bossChecklist = ModLoader.GetMod("BossChecklist");
|
Mod bossChecklist = ModLoader.GetMod("BossChecklist");
|
||||||
if (bossChecklist != null)
|
if (bossChecklist != null)
|
||||||
{
|
{
|
||||||
bossChecklist.Call("AddBossWithInfo", "The Bloodshot Eye", 2.5f, (Func<bool>)(() => DecimationWorld.downedBloodshotEye), "INSERT LATER");
|
bossChecklist.Call("AddBossWithInfo", "The Bloodshot Eye", 2.5f,
|
||||||
bossChecklist.Call("AddBossWithInfo", "The Ancient Dune Worm", 5.7f, (Func<bool>)(() => DecimationWorld.downedDuneWorm), "INSERT LATER");
|
(Func<bool>) (() => DecimationWorld.downedBloodshotEye), "INSERT LATER");
|
||||||
bossChecklist.Call("AddBossWithInfo", "Arachnus", 20f, (Func<bool>)(() => DecimationWorld.downedArachnus), "INSERT LATER");
|
bossChecklist.Call("AddBossWithInfo", "The Great Dune Wyrm", 5.7f,
|
||||||
|
(Func<bool>) (() => DecimationWorld.downedDuneWyrm), "INSERT LATER");
|
||||||
|
bossChecklist.Call("AddBossWithInfo", "Arachnus", 20f,
|
||||||
|
(Func<bool>) (() => DecimationWorld.downedArachnus), "INSERT LATER");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddRecipeGroups()
|
public override void AddRecipeGroups()
|
||||||
{
|
{
|
||||||
RecipeGroup gems = new RecipeGroup(() => Lang.misc[37] + " Gem", new int[]
|
RecipeGroup gems = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " Gem",
|
||||||
{
|
|
||||||
ItemID.Amethyst,
|
ItemID.Amethyst,
|
||||||
ItemID.Topaz,
|
ItemID.Topaz,
|
||||||
ItemID.Emerald,
|
ItemID.Emerald,
|
||||||
ItemID.Sapphire,
|
ItemID.Sapphire,
|
||||||
ItemID.Ruby,
|
ItemID.Ruby,
|
||||||
ItemID.Diamond,
|
ItemID.Diamond);
|
||||||
});
|
RecipeGroup.RegisterGroup(DecimationRecipeGroupID.AnyGem, gems);
|
||||||
|
|
||||||
RecipeGroup threads = new RecipeGroup(() => Lang.misc[37] + " Thread", new int[]
|
RecipeGroup threads = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " Thread",
|
||||||
{
|
|
||||||
ItemID.BlackThread,
|
ItemID.BlackThread,
|
||||||
ItemID.GreenThread,
|
ItemID.GreenThread,
|
||||||
ItemID.PinkThread
|
ItemID.PinkThread);
|
||||||
});
|
RecipeGroup.RegisterGroup(DecimationRecipeGroupID.AnyThread, threads);
|
||||||
|
|
||||||
RecipeGroup.RegisterGroup("AnyGem", gems);
|
RecipeGroup corruptedWoodAxes = new RecipeGroup(
|
||||||
RecipeGroup.RegisterGroup("AnyThread", threads);
|
() => Language.GetTextValue("LegacyMisc.37") + " Corrupted Wood Axe",
|
||||||
|
ModContent.ItemType<ShadewoodAxe>(),
|
||||||
|
ModContent.ItemType<EbonwoodAxe>());
|
||||||
|
RecipeGroup.RegisterGroup(DecimationRecipeGroupID.CorruptedWoodAxes, corruptedWoodAxes);
|
||||||
|
|
||||||
|
RecipeGroup corruptedWoodHammers = new RecipeGroup(
|
||||||
|
() => Language.GetTextValue("LegacyMisc.37") + " Corrupted Wood Hammer",
|
||||||
|
ItemID.ShadewoodHammer,
|
||||||
|
ItemID.EbonwoodHammer);
|
||||||
|
RecipeGroup.RegisterGroup(DecimationRecipeGroupID.CorruptedWoodHammers, corruptedWoodHammers);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void HandlePacket(BinaryReader reader, int whoAmI)
|
public override void HandlePacket(BinaryReader reader, int whoAmI)
|
||||||
{
|
{
|
||||||
DecimationModMessageType msgType = (DecimationModMessageType)reader.ReadByte();
|
DecimationModMessageType msgType = (DecimationModMessageType) reader.ReadByte();
|
||||||
|
|
||||||
switch (msgType)
|
switch (msgType)
|
||||||
{
|
{
|
||||||
case DecimationModMessageType.Arachnus:
|
case DecimationModMessageType.Arachnus:
|
||||||
Arachnus arachnus = (Arachnus)Main.npc[reader.ReadInt32()].modNPC;
|
Arachnus arachnus = (Arachnus) Main.npc[reader.ReadInt32()].modNPC;
|
||||||
if (arachnus != null && arachnus.npc.active)
|
if (arachnus != null && arachnus.npc.active) arachnus.HandlePacket(reader);
|
||||||
{
|
|
||||||
arachnus.HandlePacket(reader);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case DecimationModMessageType.DuneWorm:
|
case DecimationModMessageType.DuneWyrm:
|
||||||
AncientDuneWormHead duneWorm = (AncientDuneWormHead)Main.npc[reader.ReadInt32()].modNPC;
|
DuneWyrmHead duneWyrm = (DuneWyrmHead) Main.npc[reader.ReadInt32()].modNPC;
|
||||||
if (duneWorm != null && duneWorm.npc.active)
|
if (duneWyrm != null && duneWyrm.npc.active) duneWyrm.HandlePacket(reader);
|
||||||
{
|
break;
|
||||||
// TODO multiplayer
|
case DecimationModMessageType.AncientTombCrawler:
|
||||||
//duneWorm.HandlePacket(reader);
|
AncientTombCrawler tombCrawler = (AncientTombCrawler) Main.npc[reader.ReadInt32()].modNPC;
|
||||||
}
|
if (tombCrawler != null && tombCrawler.npc.active) tombCrawler.HandlePacket(reader);
|
||||||
break;
|
break;
|
||||||
case DecimationModMessageType.SpawnBoss:
|
case DecimationModMessageType.SpawnBoss:
|
||||||
int type = reader.ReadInt32();
|
int type = reader.ReadInt32();
|
||||||
int player = reader.ReadInt32();
|
int player = reader.ReadInt32();
|
||||||
Main.PlaySound(15, (int)Main.player[player].position.X, (int)Main.player[player].position.Y, 0);
|
Main.PlaySound(15, (int) Main.player[player].position.X, (int) Main.player[player].position.Y, 0);
|
||||||
if (Main.netMode != 1)
|
if (Main.netMode != 1)
|
||||||
NPC.SpawnOnPlayer(player, type);
|
NPC.SpawnOnPlayer(player, type);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
ErrorLogger.Log("DecimationMod: Unknown Message type: " + msgType);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum DecimationModMessageType : byte
|
internal enum DecimationModMessageType : byte
|
||||||
{
|
{
|
||||||
Arachnus,
|
Arachnus,
|
||||||
DuneWorm,
|
DuneWyrm,
|
||||||
|
AncientTombCrawler,
|
||||||
SpawnBoss
|
SpawnBoss
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,11 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Decimation.Content.Buffs.Buffs;
|
using Decimation.Content.Buffs.Buffs;
|
||||||
using Decimation.Lib;
|
using Decimation.Content.Items.Accessories;
|
||||||
|
using Decimation.Content.Items.Amulets;
|
||||||
|
using Decimation.Content.Items.Misc;
|
||||||
using Decimation.Lib.Amulets;
|
using Decimation.Lib.Amulets;
|
||||||
using Decimation.Lib.Collections;
|
using Decimation.Lib.Collections;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
using Decimation.Content.Items.Amulets;
|
|
||||||
using Decimation.Content.Items.Misc;
|
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.Graphics.Shaders;
|
using Terraria.Graphics.Shaders;
|
||||||
@ -15,7 +16,7 @@ using Terraria.ModLoader.IO;
|
|||||||
|
|
||||||
namespace Decimation.Content
|
namespace Decimation.Content
|
||||||
{
|
{
|
||||||
public class DecimationPlayer : DecimationModPlayer
|
public class DecimationPlayer : ModPlayer
|
||||||
{
|
{
|
||||||
// Amulet slot
|
// Amulet slot
|
||||||
private Amulet _amuletSlotAmulet;
|
private Amulet _amuletSlotAmulet;
|
||||||
@ -42,7 +43,6 @@ namespace Decimation.Content
|
|||||||
// Effects
|
// Effects
|
||||||
public bool hasCursedAccessory;
|
public bool hasCursedAccessory;
|
||||||
public byte hyperStars;
|
public byte hyperStars;
|
||||||
public byte soulFruits;
|
|
||||||
|
|
||||||
public bool isInCombat;
|
public bool isInCombat;
|
||||||
public bool jestersQuiverEquiped;
|
public bool jestersQuiverEquiped;
|
||||||
@ -58,6 +58,7 @@ namespace Decimation.Content
|
|||||||
|
|
||||||
// Scarab shield
|
// Scarab shield
|
||||||
public int solarCounter = 0;
|
public int solarCounter = 0;
|
||||||
|
public byte soulFruits;
|
||||||
public bool tideTurnerEquipped;
|
public bool tideTurnerEquipped;
|
||||||
public int ttDash;
|
public int ttDash;
|
||||||
public int ttHit;
|
public int ttHit;
|
||||||
@ -67,8 +68,8 @@ namespace Decimation.Content
|
|||||||
// Slimy Feet buff
|
// Slimy Feet buff
|
||||||
public bool wasJumping = false;
|
public bool wasJumping = false;
|
||||||
|
|
||||||
public override bool HasShield { get; set; }
|
public ICollection<int> EquippedAccessories { get; } = new List<int>();
|
||||||
public override bool HasLavaCharm { get; set; }
|
public bool NextHitCrit { get; set; }
|
||||||
|
|
||||||
public Item AmuletSlotItem
|
public Item AmuletSlotItem
|
||||||
{
|
{
|
||||||
@ -82,12 +83,14 @@ namespace Decimation.Content
|
|||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
this.AmuletSlotItem = new Item();
|
AmuletSlotItem = new Item();
|
||||||
this.AmuletSlotItem.SetDefaults(0, true);
|
AmuletSlotItem.SetDefaults(0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ResetEffects()
|
public override void ResetEffects()
|
||||||
{
|
{
|
||||||
|
EquippedAccessories.Clear();
|
||||||
|
|
||||||
closeToEnchantedAnvil = false;
|
closeToEnchantedAnvil = false;
|
||||||
jestersQuiverEquiped = false;
|
jestersQuiverEquiped = false;
|
||||||
deadeyesQuiverEquipped = false;
|
deadeyesQuiverEquipped = false;
|
||||||
@ -97,13 +100,10 @@ namespace Decimation.Content
|
|||||||
tideTurnerEquipped = false;
|
tideTurnerEquipped = false;
|
||||||
vampire = false;
|
vampire = false;
|
||||||
|
|
||||||
this.HasLavaCharm = false;
|
|
||||||
this.HasShield = false;
|
|
||||||
|
|
||||||
hasCursedAccessory = false;
|
hasCursedAccessory = false;
|
||||||
|
|
||||||
this.player.statManaMax2 += hyperStars * HyperStar.ManaHealAmount;
|
player.statManaMax2 += hyperStars * HyperStar.ManaHealAmount;
|
||||||
this.player.statLifeMax2 += soulFruits * SoulFruit.LifeHealAmount;
|
player.statLifeMax2 += soulFruits * SoulFruit.LifeHealAmount;
|
||||||
|
|
||||||
if (combatTime > 360)
|
if (combatTime > 360)
|
||||||
{
|
{
|
||||||
@ -117,8 +117,8 @@ namespace Decimation.Content
|
|||||||
amuletsBuffTime = 0;
|
amuletsBuffTime = 0;
|
||||||
amuletsBuffWhenAttacking = false;
|
amuletsBuffWhenAttacking = false;
|
||||||
|
|
||||||
if (!this.player.HasBuff(ModContent.BuffType<SlimyFeet>())) lastJumpBoost = 0;
|
if (!player.HasBuff(ModContent.BuffType<SlimyFeet>())) lastJumpBoost = 0;
|
||||||
if (!this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()))
|
if (!player.HasBuff(ModContent.BuffType<ScarabEndurance>()))
|
||||||
{
|
{
|
||||||
scarabEnduranceBuffTimeCounter = 0;
|
scarabEnduranceBuffTimeCounter = 0;
|
||||||
scarabCounter = 0;
|
scarabCounter = 0;
|
||||||
@ -137,17 +137,17 @@ namespace Decimation.Content
|
|||||||
|
|
||||||
return new TagCompound
|
return new TagCompound
|
||||||
{
|
{
|
||||||
{"amuletSlotItem", ItemIO.Save(this.AmuletSlotItem)},
|
{"amuletSlotItem", ItemIO.Save(AmuletSlotItem)},
|
||||||
{"hyperStars", this.hyperStars},
|
{"hyperStars", hyperStars},
|
||||||
{"soulFruits", soulFruits}
|
{"soulFruits", soulFruits}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Load(TagCompound tag)
|
public override void Load(TagCompound tag)
|
||||||
{
|
{
|
||||||
this.AmuletSlotItem = ItemIO.Load(tag.GetCompound("amuletSlotItem"));
|
AmuletSlotItem = ItemIO.Load(tag.GetCompound("amuletSlotItem"));
|
||||||
this.hyperStars = tag.GetByte("hyperStars");
|
hyperStars = tag.GetByte("hyperStars");
|
||||||
this.soulFruits = tag.GetByte("soulFruits");
|
soulFruits = tag.GetByte("soulFruits");
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIND AN ALTERNATIVE! THIS METHOD DOESN'T GET CALLED WITH EVERY WEAPONS
|
// FIND AN ALTERNATIVE! THIS METHOD DOESN'T GET CALLED WITH EVERY WEAPONS
|
||||||
@ -177,7 +177,7 @@ namespace Decimation.Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Frost Amulet
|
// Frost Amulet
|
||||||
if (this.AmuletSlotItem.type == ModContent.ItemType<FrostAmulet>() && toCheck.arrow)
|
if (AmuletSlotItem.type == ModContent.ItemType<FrostAmulet>() && toCheck.arrow)
|
||||||
{
|
{
|
||||||
speedX *= 1.03f;
|
speedX *= 1.03f;
|
||||||
speedY *= 1.03f;
|
speedY *= 1.03f;
|
||||||
@ -196,10 +196,10 @@ namespace Decimation.Content
|
|||||||
return false;
|
return false;
|
||||||
if (endlessPouchofLifeEquipped && ammo.ammo == AmmoID.Bullet)
|
if (endlessPouchofLifeEquipped && ammo.ammo == AmmoID.Bullet)
|
||||||
return false;
|
return false;
|
||||||
if (this.AmuletSlotItem.type == ModContent.ItemType<FrostAmulet>() && ammo.ammo == AmmoID.Arrow &&
|
if (AmuletSlotItem.type == ModContent.ItemType<FrostAmulet>() && ammo.ammo == AmmoID.Arrow &&
|
||||||
Main.rand.NextBool(50))
|
Main.rand.NextBool(50))
|
||||||
return false;
|
return false;
|
||||||
if (this.AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && weapon.thrown &&
|
if (AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && weapon.thrown &&
|
||||||
Main.rand.NextBool(50) && weapon.thrown)
|
Main.rand.NextBool(50) && weapon.thrown)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -225,15 +225,15 @@ namespace Decimation.Content
|
|||||||
{
|
{
|
||||||
if (vampire)
|
if (vampire)
|
||||||
{
|
{
|
||||||
this.player.head = 124;
|
player.head = 124;
|
||||||
this.player.body = 85;
|
player.body = 85;
|
||||||
this.player.legs = 72;
|
player.legs = 72;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PostUpdate()
|
public override void PostUpdate()
|
||||||
{
|
{
|
||||||
oldStatDefense = this.player.statDefense;
|
oldStatDefense = player.statDefense;
|
||||||
|
|
||||||
if (lastHitCounter >= 60)
|
if (lastHitCounter >= 60)
|
||||||
{
|
{
|
||||||
@ -257,15 +257,17 @@ namespace Decimation.Content
|
|||||||
|
|
||||||
public override void OnHitPvp(Item item, Player target, int damage, bool crit)
|
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 (target.HasBuff(ModContent.BuffType<ScarabEndurance>())) player.AddBuff(BuffID.OnFire, 300);
|
||||||
|
|
||||||
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
|
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
|
||||||
this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>())
|
AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>())
|
||||||
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
|
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
|
||||||
target.AddBuff(amuletsBuff, amuletsBuffTime);
|
target.AddBuff(amuletsBuff, amuletsBuffTime);
|
||||||
|
|
||||||
if (this.AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>())
|
if (AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>())
|
||||||
CrystalAmuletEffect();
|
CrystalAmuletEffect();
|
||||||
|
|
||||||
|
_amuletSlotAmulet?.Synergy.OnHitPlayer(this, target, item, ref damage, ref crit);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitNPC(Item item, NPC target, int damage, float knockback, bool crit)
|
public override void OnHitNPC(Item item, NPC target, int damage, float knockback, bool crit)
|
||||||
@ -274,16 +276,18 @@ namespace Decimation.Content
|
|||||||
combatTime = 0;
|
combatTime = 0;
|
||||||
|
|
||||||
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
|
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
|
||||||
this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>())
|
AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>())
|
||||||
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
|
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
|
||||||
target.AddBuff(amuletsBuff, amuletsBuffTime);
|
target.AddBuff(amuletsBuff, amuletsBuffTime);
|
||||||
|
|
||||||
|
_amuletSlotAmulet?.Synergy.OnHitNPC(this, target, item, ref damage, ref crit);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitPvpWithProj(Projectile proj, Player target, int damage, bool crit)
|
public override void OnHitPvpWithProj(Projectile proj, Player target, int damage, bool crit)
|
||||||
{
|
{
|
||||||
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
|
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
|
||||||
(this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
|
(AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
|
||||||
this.AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
|
AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
|
||||||
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
|
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
|
||||||
target.AddBuff(amuletsBuff, amuletsBuffTime);
|
target.AddBuff(amuletsBuff, amuletsBuffTime);
|
||||||
}
|
}
|
||||||
@ -294,15 +298,15 @@ namespace Decimation.Content
|
|||||||
combatTime = 0;
|
combatTime = 0;
|
||||||
|
|
||||||
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
|
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
|
||||||
(this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
|
(AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
|
||||||
this.AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
|
AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
|
||||||
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
|
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
|
||||||
target.AddBuff(amuletsBuff, amuletsBuffTime);
|
target.AddBuff(amuletsBuff, amuletsBuffTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitByNPC(NPC npc, int damage, bool crit)
|
public override void OnHitByNPC(NPC npc, int damage, bool crit)
|
||||||
{
|
{
|
||||||
if (this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
|
if (player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
|
||||||
lastHitCounter == 0 &&
|
lastHitCounter == 0 &&
|
||||||
!wasHurt)
|
!wasHurt)
|
||||||
{
|
{
|
||||||
@ -317,7 +321,7 @@ namespace Decimation.Content
|
|||||||
|
|
||||||
if (graniteLinedTunicEquipped)
|
if (graniteLinedTunicEquipped)
|
||||||
{
|
{
|
||||||
this.player.statLife += (int) (damage * 0.04f);
|
player.statLife += (int) (damage * 0.04f);
|
||||||
|
|
||||||
if (Main.rand.Next(3, 100) < 3)
|
if (Main.rand.Next(3, 100) < 3)
|
||||||
npc.AddBuff(BuffID.Confused, 600);
|
npc.AddBuff(BuffID.Confused, 600);
|
||||||
@ -325,26 +329,32 @@ namespace Decimation.Content
|
|||||||
|
|
||||||
if (tideTurnerEquipped && Main.rand.NextBool(2))
|
if (tideTurnerEquipped && Main.rand.NextBool(2))
|
||||||
{
|
{
|
||||||
Main.NewText("Tide Turner");
|
player.statLife += damage;
|
||||||
this.player.statLife += damage;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Player otherPlayer in Main.player)
|
foreach (Player otherPlayer in Main.player)
|
||||||
if (otherPlayer.whoAmI != this.player.whoAmI)
|
if (otherPlayer.whoAmI != player.whoAmI)
|
||||||
if (otherPlayer.GetModPlayer<DecimationPlayer>().AmuletSlotItem.type ==
|
if (otherPlayer.GetModPlayer<DecimationPlayer>().AmuletSlotItem.type ==
|
||||||
ModContent.ItemType<GraniteAmulet>() && otherPlayer.team == this.player.team)
|
ModContent.ItemType<GraniteAmulet>() && otherPlayer.team == player.team)
|
||||||
{
|
{
|
||||||
this.player.statLife += (int) (damage * 0.03f);
|
player.statLife += (int) (damage * 0.03f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
|
if (AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
|
||||||
CrystalAmuletEffect();
|
CrystalAmuletEffect();
|
||||||
|
|
||||||
|
if (this.HasEquippedAccessory(ModContent.ItemType<WaspNecklace>()) ||
|
||||||
|
this.HasEquippedAccessory(ModContent.ItemType<VeilOfVengeance>()))
|
||||||
|
{
|
||||||
|
player.AddBuff(BuffID.Panic, 300);
|
||||||
|
SpawnWaspNecklaceWasps();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitByProjectile(Projectile proj, int damage, bool crit)
|
public override void OnHitByProjectile(Projectile proj, int damage, bool crit)
|
||||||
{
|
{
|
||||||
if (this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
|
if (player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
|
||||||
lastHitCounter == 0 &&
|
lastHitCounter == 0 &&
|
||||||
!wasHurt)
|
!wasHurt)
|
||||||
{
|
{
|
||||||
@ -363,7 +373,7 @@ namespace Decimation.Content
|
|||||||
|
|
||||||
if (graniteLinedTunicEquipped)
|
if (graniteLinedTunicEquipped)
|
||||||
{
|
{
|
||||||
this.player.statLife += (int) (damage * 0.04f);
|
player.statLife += (int) (damage * 0.04f);
|
||||||
|
|
||||||
if (proj.npcProj && Main.rand.Next(3, 100) < 3)
|
if (proj.npcProj && Main.rand.Next(3, 100) < 3)
|
||||||
Main.npc[proj.owner].AddBuff(BuffID.Confused, 600);
|
Main.npc[proj.owner].AddBuff(BuffID.Confused, 600);
|
||||||
@ -372,26 +382,99 @@ namespace Decimation.Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (Player otherPlayer in Main.player)
|
foreach (Player otherPlayer in Main.player)
|
||||||
if (otherPlayer.whoAmI != this.player.whoAmI)
|
if (otherPlayer.whoAmI != player.whoAmI)
|
||||||
if (otherPlayer.GetModPlayer<DecimationPlayer>().AmuletSlotItem.type ==
|
if (otherPlayer.GetModPlayer<DecimationPlayer>().AmuletSlotItem.type ==
|
||||||
ModContent.ItemType<GraniteAmulet>() && otherPlayer.team == this.player.team)
|
ModContent.ItemType<GraniteAmulet>() && otherPlayer.team == player.team)
|
||||||
{
|
{
|
||||||
this.player.statLife += (int) (damage * 0.03f);
|
player.statLife += (int) (damage * 0.03f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
|
if (AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
|
||||||
CrystalAmuletEffect();
|
CrystalAmuletEffect();
|
||||||
|
|
||||||
|
if (this.HasEquippedAccessory(ModContent.ItemType<WaspNecklace>()) ||
|
||||||
|
this.HasEquippedAccessory(ModContent.ItemType<VeilOfVengeance>()))
|
||||||
|
{
|
||||||
|
player.AddBuff(BuffID.Panic, 300);
|
||||||
|
SpawnWaspNecklaceWasps();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyHitNPC(Item item, NPC target, ref int damage, ref float knockback, ref bool crit)
|
||||||
|
{
|
||||||
|
if (NextHitCrit)
|
||||||
|
{
|
||||||
|
crit = true;
|
||||||
|
NextHitCrit = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref int damage, ref float knockback,
|
||||||
|
ref bool crit,
|
||||||
|
ref int hitDirection)
|
||||||
|
{
|
||||||
|
if (NextHitCrit)
|
||||||
|
{
|
||||||
|
crit = true;
|
||||||
|
NextHitCrit = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyHitPvp(Item item, Player target, ref int damage, ref bool crit)
|
||||||
|
{
|
||||||
|
if (NextHitCrit)
|
||||||
|
{
|
||||||
|
crit = true;
|
||||||
|
NextHitCrit = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target.TeamHasEquippedAccessory(ModContent.ItemType<TitanShield>())) damage -= (int) (damage * 0.35f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyHitPvpWithProj(Projectile proj, Player target, ref int damage, ref bool crit)
|
||||||
|
{
|
||||||
|
if (NextHitCrit)
|
||||||
|
{
|
||||||
|
crit = true;
|
||||||
|
NextHitCrit = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ModifyHitByNPC(NPC npc, ref int damage, ref bool crit)
|
public override void ModifyHitByNPC(NPC npc, ref int damage, ref bool crit)
|
||||||
{
|
{
|
||||||
_amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage);
|
_amuletSlotAmulet?.Synergy.OnPlayerHit(this, ref damage);
|
||||||
|
|
||||||
|
if (this.TeamHasEquippedAccessory(ModContent.ItemType<TitanShield>())) damage -= (int) (damage * 0.35f);
|
||||||
|
else if (this.TeamHasEquippedAccessory(ModContent.ItemType<TitanicPaladinShield>())) damage -= (int) (damage * 0.30f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit)
|
public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit)
|
||||||
{
|
{
|
||||||
_amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage);
|
_amuletSlotAmulet?.Synergy.OnPlayerHit(this, ref damage);
|
||||||
|
|
||||||
|
if (this.TeamHasEquippedAccessory(ModContent.ItemType<TitanShield>())) damage -= (int) (damage * 0.35f);
|
||||||
|
else if (this.TeamHasEquippedAccessory(ModContent.ItemType<TitanicPaladinShield>())) damage -= (int) (damage * 0.30f);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SpawnWaspNecklaceWasps()
|
||||||
|
{
|
||||||
|
int waspsCount = 1;
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
if (Main.rand.NextBool(3))
|
||||||
|
waspsCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector2 position = player.position;
|
||||||
|
Vector2 speed = new Vector2(Main.rand.Next(-35, 36) * 0.02f, Main.rand.Next(-35, 36) * 0.02f);
|
||||||
|
int damages = 10 + Main.rand.Next(1, 4);
|
||||||
|
const float kb = 0.5f;
|
||||||
|
|
||||||
|
for (int i = 0; i < waspsCount; i++)
|
||||||
|
{
|
||||||
|
Projectile.NewProjectile(position, speed, ProjectileID.Wasp, damages, kb, player.whoAmI);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DashMovement()
|
public void DashMovement()
|
||||||
@ -401,80 +484,80 @@ namespace Decimation.Content
|
|||||||
if (ttHit < 0)
|
if (ttHit < 0)
|
||||||
{
|
{
|
||||||
Rectangle rectangle =
|
Rectangle rectangle =
|
||||||
new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0),
|
new Rectangle((int) (player.position.X + player.velocity.X * 0.5 - 4.0),
|
||||||
(int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8,
|
(int) (player.position.Y + player.velocity.Y * 0.5 - 4.0), player.width + 8,
|
||||||
this.player.height + 8);
|
player.height + 8);
|
||||||
for (int i = 0; i < 200; i++)
|
for (int i = 0; i < 200; i++)
|
||||||
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly)
|
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly)
|
||||||
{
|
{
|
||||||
NPC nPC = Main.npc[i];
|
NPC nPC = Main.npc[i];
|
||||||
Rectangle rect = nPC.getRect();
|
Rectangle rect = nPC.getRect();
|
||||||
if (rectangle.Intersects(rect) && (nPC.noTileCollide || this.player.CanHit(nPC)))
|
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
|
||||||
{
|
{
|
||||||
float num = dashDamages * this.player.meleeDamage;
|
float num = dashDamages * player.meleeDamage;
|
||||||
float num2 = 9f;
|
float num2 = 9f;
|
||||||
bool crit = false;
|
bool crit = false;
|
||||||
if (this.player.kbGlove) num2 *= 2f;
|
if (player.kbGlove) num2 *= 2f;
|
||||||
if (this.player.kbBuff) num2 *= 1.5f;
|
if (player.kbBuff) num2 *= 1.5f;
|
||||||
if (Main.rand.Next(100) < this.player.meleeCrit) crit = true;
|
if (Main.rand.Next(100) < player.meleeCrit) crit = true;
|
||||||
int num3 = this.player.direction;
|
int num3 = player.direction;
|
||||||
if (this.player.velocity.X < 0f) num3 = -1;
|
if (player.velocity.X < 0f) num3 = -1;
|
||||||
if (this.player.velocity.X > 0f) num3 = 1;
|
if (player.velocity.X > 0f) num3 = 1;
|
||||||
if (this.player.whoAmI == Main.myPlayer)
|
if (player.whoAmI == Main.myPlayer)
|
||||||
this.player.ApplyDamageToNPC(nPC, (int) num, num2, num3, crit);
|
player.ApplyDamageToNPC(nPC, (int) num, num2, num3, crit);
|
||||||
ttDash = 10;
|
ttDash = 10;
|
||||||
dashDelay = 30;
|
dashDelay = 30;
|
||||||
this.player.velocity.X = (0f - num3) * 9f;
|
player.velocity.X = (0f - num3) * 9f;
|
||||||
this.player.velocity.Y = -4f;
|
player.velocity.Y = -4f;
|
||||||
this.player.immune = true;
|
player.immune = true;
|
||||||
this.player.immuneNoBlink = true;
|
player.immuneNoBlink = true;
|
||||||
this.player.immuneTime = 4;
|
player.immuneTime = 4;
|
||||||
ttHit = i;
|
ttHit = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((!this.player.controlLeft || this.player.velocity.X >= 0f) &&
|
else if ((!player.controlLeft || player.velocity.X >= 0f) &&
|
||||||
(!this.player.controlRight || this.player.velocity.X <= 0f))
|
(!player.controlRight || player.velocity.X <= 0f))
|
||||||
{
|
{
|
||||||
this.player.velocity.X = this.player.velocity.X * 0.95f;
|
player.velocity.X = player.velocity.X * 0.95f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dash == 3 && dashDelay < 0 && this.player.whoAmI == Main.myPlayer)
|
if (dash == 3 && dashDelay < 0 && player.whoAmI == Main.myPlayer)
|
||||||
{
|
{
|
||||||
Rectangle rectangle2 =
|
Rectangle rectangle2 =
|
||||||
new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0),
|
new Rectangle((int) (player.position.X + player.velocity.X * 0.5 - 4.0),
|
||||||
(int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8,
|
(int) (player.position.Y + player.velocity.Y * 0.5 - 4.0), player.width + 8,
|
||||||
this.player.height + 8);
|
player.height + 8);
|
||||||
for (int j = 0; j < 200; j++)
|
for (int j = 0; j < 200; j++)
|
||||||
if (Main.npc[j].active && !Main.npc[j].dontTakeDamage && !Main.npc[j].friendly &&
|
if (Main.npc[j].active && !Main.npc[j].dontTakeDamage && !Main.npc[j].friendly &&
|
||||||
Main.npc[j].immune[this.player.whoAmI] <= 0)
|
Main.npc[j].immune[player.whoAmI] <= 0)
|
||||||
{
|
{
|
||||||
NPC nPC2 = Main.npc[j];
|
NPC nPC2 = Main.npc[j];
|
||||||
Rectangle rect2 = nPC2.getRect();
|
Rectangle rect2 = nPC2.getRect();
|
||||||
if (rectangle2.Intersects(rect2) && (nPC2.noTileCollide || this.player.CanHit(nPC2)))
|
if (rectangle2.Intersects(rect2) && (nPC2.noTileCollide || player.CanHit(nPC2)))
|
||||||
{
|
{
|
||||||
float num4 = 150f * this.player.meleeDamage;
|
float num4 = 150f * player.meleeDamage;
|
||||||
float num5 = 9f;
|
float num5 = 9f;
|
||||||
bool crit2 = false;
|
bool crit2 = false;
|
||||||
if (this.player.kbGlove) num5 *= 2f;
|
if (player.kbGlove) num5 *= 2f;
|
||||||
if (this.player.kbBuff) num5 *= 1.5f;
|
if (player.kbBuff) num5 *= 1.5f;
|
||||||
if (Main.rand.Next(100) < this.player.meleeCrit) crit2 = true;
|
if (Main.rand.Next(100) < player.meleeCrit) crit2 = true;
|
||||||
int direction = this.player.direction;
|
int direction = player.direction;
|
||||||
if (this.player.velocity.X < 0f) direction = -1;
|
if (player.velocity.X < 0f) direction = -1;
|
||||||
if (this.player.velocity.X > 0f) direction = 1;
|
if (player.velocity.X > 0f) direction = 1;
|
||||||
if (this.player.whoAmI == Main.myPlayer)
|
if (player.whoAmI == Main.myPlayer)
|
||||||
{
|
{
|
||||||
this.player.ApplyDamageToNPC(nPC2, (int) num4, num5, direction, crit2);
|
player.ApplyDamageToNPC(nPC2, (int) num4, num5, direction, crit2);
|
||||||
int num6 = Projectile.NewProjectile(this.player.Center.X, this.player.Center.Y, 0f, 0f,
|
int num6 = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f,
|
||||||
608, 150, 15f, Main.myPlayer);
|
608, 150, 15f, Main.myPlayer);
|
||||||
Main.projectile[num6].Kill();
|
Main.projectile[num6].Kill();
|
||||||
}
|
}
|
||||||
|
|
||||||
nPC2.immune[this.player.whoAmI] = 6;
|
nPC2.immune[player.whoAmI] = 6;
|
||||||
this.player.immune = true;
|
player.immune = true;
|
||||||
this.player.immuneNoBlink = true;
|
player.immuneNoBlink = true;
|
||||||
this.player.immuneTime = 4;
|
player.immuneTime = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -489,43 +572,43 @@ namespace Decimation.Content
|
|||||||
{
|
{
|
||||||
float num7 = 12f;
|
float num7 = 12f;
|
||||||
float num8 = 0.992f;
|
float num8 = 0.992f;
|
||||||
float num9 = Math.Max(this.player.accRunSpeed, this.player.maxRunSpeed);
|
float num9 = Math.Max(player.accRunSpeed, player.maxRunSpeed);
|
||||||
float num10 = 0.96f;
|
float num10 = 0.96f;
|
||||||
int num11 = 20;
|
int num11 = 20;
|
||||||
if (dash == 1)
|
if (dash == 1)
|
||||||
{
|
{
|
||||||
for (int k = 0; k < 2; k++)
|
for (int k = 0; k < 2; k++)
|
||||||
{
|
{
|
||||||
int num12 = this.player.velocity.Y != 0f
|
int num12 = player.velocity.Y != 0f
|
||||||
? Dust.NewDust(
|
? Dust.NewDust(
|
||||||
new Vector2(this.player.position.X,
|
new Vector2(player.position.X,
|
||||||
this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31,
|
player.position.Y + player.height / 2 - 8f), player.width, 16, 31,
|
||||||
0f, 0f, 100, default, 1.4f)
|
0f, 0f, 100, default, 1.4f)
|
||||||
: Dust.NewDust(
|
: Dust.NewDust(
|
||||||
new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f),
|
new Vector2(player.position.X, player.position.Y + player.height - 4f),
|
||||||
this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
|
player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
|
||||||
Dust obj = Main.dust[num12];
|
Dust obj = Main.dust[num12];
|
||||||
obj.velocity *= 0.1f;
|
obj.velocity *= 0.1f;
|
||||||
Main.dust[num12].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
Main.dust[num12].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
||||||
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
|
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (dash == 2)
|
else if (dash == 2)
|
||||||
{
|
{
|
||||||
for (int l = 0; l < 0; l++)
|
for (int l = 0; l < 0; l++)
|
||||||
{
|
{
|
||||||
int num13 = this.player.velocity.Y != 0f
|
int num13 = player.velocity.Y != 0f
|
||||||
? Dust.NewDust(
|
? Dust.NewDust(
|
||||||
new Vector2(this.player.position.X,
|
new Vector2(player.position.X,
|
||||||
this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31,
|
player.position.Y + player.height / 2 - 8f), player.width, 16, 31,
|
||||||
0f, 0f, 100, default, 1.4f)
|
0f, 0f, 100, default, 1.4f)
|
||||||
: Dust.NewDust(
|
: Dust.NewDust(
|
||||||
new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f),
|
new Vector2(player.position.X, player.position.Y + player.height - 4f),
|
||||||
this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
|
player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
|
||||||
Dust obj2 = Main.dust[num13];
|
Dust obj2 = Main.dust[num13];
|
||||||
obj2.velocity *= 0.1f;
|
obj2.velocity *= 0.1f;
|
||||||
Main.dust[num13].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
Main.dust[num13].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
||||||
Main.dust[num13].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
|
Main.dust[num13].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
num8 = 0.985f;
|
num8 = 0.985f;
|
||||||
@ -536,13 +619,13 @@ namespace Decimation.Content
|
|||||||
{
|
{
|
||||||
for (int m = 0; m < 4; m++)
|
for (int m = 0; m < 4; m++)
|
||||||
{
|
{
|
||||||
int num14 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f),
|
int num14 = Dust.NewDust(new Vector2(player.position.X, player.position.Y + 4f),
|
||||||
this.player.width, this.player.height - 8, 6, 0f, 0f, 100, default, 1.7f);
|
player.width, player.height - 8, 6, 0f, 0f, 100, default, 1.7f);
|
||||||
Dust obj3 = Main.dust[num14];
|
Dust obj3 = Main.dust[num14];
|
||||||
obj3.velocity *= 0.1f;
|
obj3.velocity *= 0.1f;
|
||||||
Main.dust[num14].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
Main.dust[num14].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
||||||
Main.dust[num14].shader =
|
Main.dust[num14].shader =
|
||||||
GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player);
|
GameShaders.Armor.GetSecondaryShader(player.ArmorSetDye(), player);
|
||||||
Main.dust[num14].noGravity = true;
|
Main.dust[num14].noGravity = true;
|
||||||
if (Main.rand.Next(2) == 0) Main.dust[num14].fadeIn = 0.5f;
|
if (Main.rand.Next(2) == 0) Main.dust[num14].fadeIn = 0.5f;
|
||||||
}
|
}
|
||||||
@ -556,12 +639,12 @@ namespace Decimation.Content
|
|||||||
{
|
{
|
||||||
for (int n = 0; n < 2; n++)
|
for (int n = 0; n < 2; n++)
|
||||||
{
|
{
|
||||||
int num15 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f),
|
int num15 = Dust.NewDust(new Vector2(player.position.X, player.position.Y + 4f),
|
||||||
this.player.width, this.player.height - 8, 229, 0f, 0f, 100, default, 1.2f);
|
player.width, player.height - 8, 229, 0f, 0f, 100, default, 1.2f);
|
||||||
Dust obj4 = Main.dust[num15];
|
Dust obj4 = Main.dust[num15];
|
||||||
obj4.velocity *= 0.1f;
|
obj4.velocity *= 0.1f;
|
||||||
Main.dust[num15].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
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].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player);
|
||||||
Main.dust[num15].noGravity = true;
|
Main.dust[num15].noGravity = true;
|
||||||
if (Main.rand.Next(2) == 0) Main.dust[num15].fadeIn = 0.3f;
|
if (Main.rand.Next(2) == 0) Main.dust[num15].fadeIn = 0.3f;
|
||||||
}
|
}
|
||||||
@ -573,25 +656,25 @@ namespace Decimation.Content
|
|||||||
|
|
||||||
if (dash > 0)
|
if (dash > 0)
|
||||||
{
|
{
|
||||||
this.player.vortexStealthActive = false;
|
player.vortexStealthActive = false;
|
||||||
if (this.player.velocity.X > num7 || this.player.velocity.X < 0f - num7)
|
if (player.velocity.X > num7 || player.velocity.X < 0f - num7)
|
||||||
{
|
{
|
||||||
this.player.velocity.X = this.player.velocity.X * num8;
|
player.velocity.X = player.velocity.X * num8;
|
||||||
}
|
}
|
||||||
else if (this.player.velocity.X > num9 || this.player.velocity.X < 0f - num9)
|
else if (player.velocity.X > num9 || player.velocity.X < 0f - num9)
|
||||||
{
|
{
|
||||||
this.player.velocity.X = this.player.velocity.X * num10;
|
player.velocity.X = player.velocity.X * num10;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dashDelay = num11;
|
dashDelay = num11;
|
||||||
if (this.player.velocity.X < 0f)
|
if (player.velocity.X < 0f)
|
||||||
this.player.velocity.X = 0f - num9;
|
player.velocity.X = 0f - num9;
|
||||||
else if (this.player.velocity.X > 0f) this.player.velocity.X = num9;
|
else if (player.velocity.X > 0f) player.velocity.X = num9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (dash > 0 && !this.player.mount.Active)
|
else if (dash > 0 && !player.mount.Active)
|
||||||
{
|
{
|
||||||
if (dash == 1)
|
if (dash == 1)
|
||||||
{
|
{
|
||||||
@ -599,7 +682,7 @@ namespace Decimation.Content
|
|||||||
bool flag = false;
|
bool flag = false;
|
||||||
if (dashTime > 0) dashTime--;
|
if (dashTime > 0) dashTime--;
|
||||||
if (dashTime < 0) dashTime++;
|
if (dashTime < 0) dashTime++;
|
||||||
if (this.player.controlRight && this.player.releaseRight)
|
if (player.controlRight && player.releaseRight)
|
||||||
{
|
{
|
||||||
if (dashTime > 0)
|
if (dashTime > 0)
|
||||||
{
|
{
|
||||||
@ -612,7 +695,7 @@ namespace Decimation.Content
|
|||||||
dashTime = 15;
|
dashTime = 15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this.player.controlLeft && this.player.releaseLeft)
|
else if (player.controlLeft && player.releaseLeft)
|
||||||
{
|
{
|
||||||
if (dashTime < 0)
|
if (dashTime < 0)
|
||||||
{
|
{
|
||||||
@ -628,20 +711,20 @@ namespace Decimation.Content
|
|||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
this.player.velocity.X = 16.9f * num16;
|
player.velocity.X = 16.9f * num16;
|
||||||
Point point = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2,
|
Point point = (player.Center + new Vector2(num16 * player.width / 2 + 2,
|
||||||
this.player.gravDir * (0f - this.player.height) / 2f +
|
player.gravDir * (0f - player.height) / 2f +
|
||||||
this.player.gravDir * 2f)).ToTileCoordinates();
|
player.gravDir * 2f)).ToTileCoordinates();
|
||||||
Point point2 = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2, 0f))
|
Point point2 = (player.Center + new Vector2(num16 * player.width / 2 + 2, 0f))
|
||||||
.ToTileCoordinates();
|
.ToTileCoordinates();
|
||||||
if (WorldGen.SolidOrSlopedTile(point.X, point.Y) ||
|
if (WorldGen.SolidOrSlopedTile(point.X, point.Y) ||
|
||||||
WorldGen.SolidOrSlopedTile(point2.X, point2.Y))
|
WorldGen.SolidOrSlopedTile(point2.X, point2.Y))
|
||||||
this.player.velocity.X = this.player.velocity.X / 2f;
|
player.velocity.X = player.velocity.X / 2f;
|
||||||
dashDelay = -1;
|
dashDelay = -1;
|
||||||
for (int num17 = 0; num17 < 20; num17++)
|
for (int num17 = 0; num17 < 20; num17++)
|
||||||
{
|
{
|
||||||
int num18 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
|
int num18 = Dust.NewDust(new Vector2(player.position.X, player.position.Y),
|
||||||
this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f);
|
player.width, player.height, 31, 0f, 0f, 100, default, 2f);
|
||||||
Dust dust = Main.dust[num18];
|
Dust dust = Main.dust[num18];
|
||||||
dust.position.X = dust.position.X + Main.rand.Next(-5, 6);
|
dust.position.X = dust.position.X + Main.rand.Next(-5, 6);
|
||||||
Dust dust2 = Main.dust[num18];
|
Dust dust2 = Main.dust[num18];
|
||||||
@ -650,20 +733,20 @@ namespace Decimation.Content
|
|||||||
obj5.velocity *= 0.2f;
|
obj5.velocity *= 0.2f;
|
||||||
Main.dust[num18].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
Main.dust[num18].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
||||||
Main.dust[num18].shader =
|
Main.dust[num18].shader =
|
||||||
GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
|
GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
int num19 = Gore.NewGore(
|
int num19 = Gore.NewGore(
|
||||||
new Vector2(this.player.position.X + this.player.width / 2 - 24f,
|
new Vector2(player.position.X + player.width / 2 - 24f,
|
||||||
this.player.position.Y + this.player.height / 2 - 34f), default,
|
player.position.Y + player.height / 2 - 34f), default,
|
||||||
Main.rand.Next(61, 64));
|
Main.rand.Next(61, 64));
|
||||||
Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f;
|
Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f;
|
||||||
Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f;
|
Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f;
|
||||||
Gore obj6 = Main.gore[num19];
|
Gore obj6 = Main.gore[num19];
|
||||||
obj6.velocity *= 0.4f;
|
obj6.velocity *= 0.4f;
|
||||||
num19 = Gore.NewGore(
|
num19 = Gore.NewGore(
|
||||||
new Vector2(this.player.position.X + this.player.width / 2 - 24f,
|
new Vector2(player.position.X + player.width / 2 - 24f,
|
||||||
this.player.position.Y + this.player.height / 2 - 14f), default,
|
player.position.Y + player.height / 2 - 14f), default,
|
||||||
Main.rand.Next(61, 64));
|
Main.rand.Next(61, 64));
|
||||||
Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f;
|
Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f;
|
||||||
Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f;
|
Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f;
|
||||||
@ -677,7 +760,7 @@ namespace Decimation.Content
|
|||||||
bool flag2 = false;
|
bool flag2 = false;
|
||||||
if (dashTime > 0) dashTime--;
|
if (dashTime > 0) dashTime--;
|
||||||
if (dashTime < 0) dashTime++;
|
if (dashTime < 0) dashTime++;
|
||||||
if (this.player.controlRight && this.player.releaseRight)
|
if (player.controlRight && player.releaseRight)
|
||||||
{
|
{
|
||||||
if (dashTime > 0)
|
if (dashTime > 0)
|
||||||
{
|
{
|
||||||
@ -690,7 +773,7 @@ namespace Decimation.Content
|
|||||||
dashTime = 15;
|
dashTime = 15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this.player.controlLeft && this.player.releaseLeft)
|
else if (player.controlLeft && player.releaseLeft)
|
||||||
{
|
{
|
||||||
if (dashTime < 0)
|
if (dashTime < 0)
|
||||||
{
|
{
|
||||||
@ -706,21 +789,21 @@ namespace Decimation.Content
|
|||||||
|
|
||||||
if (flag2)
|
if (flag2)
|
||||||
{
|
{
|
||||||
this.player.velocity.X = 14.5f * num20;
|
player.velocity.X = 14.5f * num20;
|
||||||
Point point3 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2,
|
Point point3 = (player.Center + new Vector2(num20 * player.width / 2 + 2,
|
||||||
this.player.gravDir * (0f - this.player.height) / 2f +
|
player.gravDir * (0f - player.height) / 2f +
|
||||||
this.player.gravDir * 2f)).ToTileCoordinates();
|
player.gravDir * 2f)).ToTileCoordinates();
|
||||||
Point point4 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2, 0f))
|
Point point4 = (player.Center + new Vector2(num20 * player.width / 2 + 2, 0f))
|
||||||
.ToTileCoordinates();
|
.ToTileCoordinates();
|
||||||
if (WorldGen.SolidOrSlopedTile(point3.X, point3.Y) ||
|
if (WorldGen.SolidOrSlopedTile(point3.X, point3.Y) ||
|
||||||
WorldGen.SolidOrSlopedTile(point4.X, point4.Y))
|
WorldGen.SolidOrSlopedTile(point4.X, point4.Y))
|
||||||
this.player.velocity.X = this.player.velocity.X / 2f;
|
player.velocity.X = player.velocity.X / 2f;
|
||||||
dashDelay = -1;
|
dashDelay = -1;
|
||||||
ttDash = 15;
|
ttDash = 15;
|
||||||
for (int num21 = 0; num21 < 0; num21++)
|
for (int num21 = 0; num21 < 0; num21++)
|
||||||
{
|
{
|
||||||
int num22 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
|
int num22 = Dust.NewDust(new Vector2(player.position.X, player.position.Y),
|
||||||
this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f);
|
player.width, player.height, 31, 0f, 0f, 100, default, 2f);
|
||||||
Dust dust3 = Main.dust[num22];
|
Dust dust3 = Main.dust[num22];
|
||||||
dust3.position.X = dust3.position.X + Main.rand.Next(-5, 6);
|
dust3.position.X = dust3.position.X + Main.rand.Next(-5, 6);
|
||||||
Dust dust4 = Main.dust[num22];
|
Dust dust4 = Main.dust[num22];
|
||||||
@ -729,7 +812,7 @@ namespace Decimation.Content
|
|||||||
obj8.velocity *= 0.2f;
|
obj8.velocity *= 0.2f;
|
||||||
Main.dust[num22].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
Main.dust[num22].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
||||||
Main.dust[num22].shader =
|
Main.dust[num22].shader =
|
||||||
GameShaders.Armor.GetSecondaryShader(this.player.cShield, this.player);
|
GameShaders.Armor.GetSecondaryShader(player.cShield, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -739,7 +822,7 @@ namespace Decimation.Content
|
|||||||
bool flag3 = false;
|
bool flag3 = false;
|
||||||
if (dashTime > 0) dashTime--;
|
if (dashTime > 0) dashTime--;
|
||||||
if (dashTime < 0) dashTime++;
|
if (dashTime < 0) dashTime++;
|
||||||
if (this.player.controlRight && this.player.releaseRight)
|
if (player.controlRight && player.releaseRight)
|
||||||
{
|
{
|
||||||
if (dashTime > 0)
|
if (dashTime > 0)
|
||||||
{
|
{
|
||||||
@ -752,7 +835,7 @@ namespace Decimation.Content
|
|||||||
dashTime = 15;
|
dashTime = 15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this.player.controlLeft && this.player.releaseLeft)
|
else if (player.controlLeft && player.releaseLeft)
|
||||||
{
|
{
|
||||||
if (dashTime < 0)
|
if (dashTime < 0)
|
||||||
{
|
{
|
||||||
@ -768,20 +851,20 @@ namespace Decimation.Content
|
|||||||
|
|
||||||
if (flag3)
|
if (flag3)
|
||||||
{
|
{
|
||||||
this.player.velocity.X = 21.9f * num23;
|
player.velocity.X = 21.9f * num23;
|
||||||
Point point5 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2,
|
Point point5 = (player.Center + new Vector2(num23 * player.width / 2 + 2,
|
||||||
this.player.gravDir * (0f - this.player.height) / 2f +
|
player.gravDir * (0f - player.height) / 2f +
|
||||||
this.player.gravDir * 2f)).ToTileCoordinates();
|
player.gravDir * 2f)).ToTileCoordinates();
|
||||||
Point point6 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2, 0f))
|
Point point6 = (player.Center + new Vector2(num23 * player.width / 2 + 2, 0f))
|
||||||
.ToTileCoordinates();
|
.ToTileCoordinates();
|
||||||
if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) ||
|
if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) ||
|
||||||
WorldGen.SolidOrSlopedTile(point6.X, point6.Y))
|
WorldGen.SolidOrSlopedTile(point6.X, point6.Y))
|
||||||
this.player.velocity.X = this.player.velocity.X / 2f;
|
player.velocity.X = player.velocity.X / 2f;
|
||||||
dashDelay = -1;
|
dashDelay = -1;
|
||||||
for (int num24 = 0; num24 < 20; num24++)
|
for (int num24 = 0; num24 < 20; num24++)
|
||||||
{
|
{
|
||||||
int num25 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
|
int num25 = Dust.NewDust(new Vector2(player.position.X, player.position.Y),
|
||||||
this.player.width, this.player.height, 6, 0f, 0f, 100, default, 2f);
|
player.width, player.height, 6, 0f, 0f, 100, default, 2f);
|
||||||
Dust dust5 = Main.dust[num25];
|
Dust dust5 = Main.dust[num25];
|
||||||
dust5.position.X = dust5.position.X + Main.rand.Next(-5, 6);
|
dust5.position.X = dust5.position.X + Main.rand.Next(-5, 6);
|
||||||
Dust dust6 = Main.dust[num25];
|
Dust dust6 = Main.dust[num25];
|
||||||
@ -790,7 +873,7 @@ namespace Decimation.Content
|
|||||||
obj9.velocity *= 0.2f;
|
obj9.velocity *= 0.2f;
|
||||||
Main.dust[num25].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
Main.dust[num25].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
||||||
Main.dust[num25].shader =
|
Main.dust[num25].shader =
|
||||||
GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player);
|
GameShaders.Armor.GetSecondaryShader(player.ArmorSetDye(), player);
|
||||||
Main.dust[num25].noGravity = true;
|
Main.dust[num25].noGravity = true;
|
||||||
Main.dust[num25].fadeIn = 0.5f;
|
Main.dust[num25].fadeIn = 0.5f;
|
||||||
}
|
}
|
||||||
@ -811,22 +894,11 @@ namespace Decimation.Content
|
|||||||
float speedX = (float) Math.Cos(currentAngle) * speed;
|
float speedX = (float) Math.Cos(currentAngle) * speed;
|
||||||
float speedY = (float) Math.Sin(currentAngle) * speed;
|
float speedY = (float) Math.Sin(currentAngle) * speed;
|
||||||
|
|
||||||
Projectile.NewProjectile(this.player.Center, new Vector2(speedX, speedY), ProjectileID.CrystalShard, 20,
|
Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileID.CrystalShard, 20,
|
||||||
5, this.player.whoAmI);
|
5, player.whoAmI);
|
||||||
|
|
||||||
currentAngle += angleDifference;
|
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
11
Content/DecimationRecipeGroupID.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
namespace Decimation.Content
|
||||||
|
{
|
||||||
|
public class DecimationRecipeGroupID
|
||||||
|
{
|
||||||
|
public const string AnyGem = "AnyGem";
|
||||||
|
public const string AnyThread = "AnyThread";
|
||||||
|
public const string CorruptedWoodAxes = "CorruptedAxes";
|
||||||
|
public const string CorruptedWoodHammers = "CorruptedHammers";
|
||||||
|
public const string CorruptedWoodPickaxes = "CorruptedPickaxes";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,28 +1,26 @@
|
|||||||
using System.IO;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Terraria;
|
using System.IO;
|
||||||
using Terraria.ModLoader;
|
using Decimation.Content.Projectiles.Boss.DuneWyrm;
|
||||||
using Terraria.World.Generation;
|
|
||||||
using Terraria.GameContent.Generation;
|
|
||||||
using Terraria.ModLoader.IO;
|
|
||||||
using Decimation.Content.Structures;
|
using Decimation.Content.Structures;
|
||||||
using Microsoft.Xna.Framework;
|
using Terraria;
|
||||||
using System;
|
using Terraria.GameContent.Generation;
|
||||||
using Terraria.ID;
|
using Terraria.ModLoader;
|
||||||
|
using Terraria.ModLoader.IO;
|
||||||
|
using Terraria.World.Generation;
|
||||||
|
|
||||||
namespace Decimation.Content
|
namespace Decimation.Content
|
||||||
{
|
{
|
||||||
public class DecimationWorld : ModWorld
|
public class DecimationWorld : ModWorld
|
||||||
{
|
{
|
||||||
public static bool downedBloodshotEye;
|
public static bool downedBloodshotEye;
|
||||||
public static bool downedDuneWorm;
|
public static bool downedDuneWyrm;
|
||||||
public static bool downedArachnus;
|
public static bool downedArachnus;
|
||||||
public static bool downedWyvern;
|
public static bool downedWyvern;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
downedBloodshotEye = false;
|
downedBloodshotEye = false;
|
||||||
downedDuneWorm = false;
|
downedDuneWyrm = false;
|
||||||
downedArachnus = false;
|
downedArachnus = false;
|
||||||
downedWyvern = false;
|
downedWyvern = false;
|
||||||
}
|
}
|
||||||
@ -31,7 +29,7 @@ namespace Decimation.Content
|
|||||||
{
|
{
|
||||||
var downed = new List<string>();
|
var downed = new List<string>();
|
||||||
if (downedBloodshotEye) downed.Add("downedBloodshotEye");
|
if (downedBloodshotEye) downed.Add("downedBloodshotEye");
|
||||||
if (downedDuneWorm) downed.Add("downedDuneWorm");
|
if (downedDuneWyrm) downed.Add("downedDuneWyrm");
|
||||||
if (downedArachnus) downed.Add("downedArachnus");
|
if (downedArachnus) downed.Add("downedArachnus");
|
||||||
if (downedWyvern) downed.Add("downedWyvern");
|
if (downedWyvern) downed.Add("downedWyvern");
|
||||||
return new TagCompound {
|
return new TagCompound {
|
||||||
@ -42,15 +40,17 @@ namespace Decimation.Content
|
|||||||
{
|
{
|
||||||
var downed = tag.GetList<string>("downed");
|
var downed = tag.GetList<string>("downed");
|
||||||
downedBloodshotEye = downed.Contains("downedBloodshotEye");
|
downedBloodshotEye = downed.Contains("downedBloodshotEye");
|
||||||
downedDuneWorm = downed.Contains("downedDuneWorm");
|
downedDuneWyrm = downed.Contains("downedDuneWyrm");
|
||||||
downedArachnus = downed.Contains("downedArachnus");
|
downedArachnus = downed.Contains("downedArachnus");
|
||||||
downedWyvern = downed.Contains("downedWyvern");
|
downedWyvern = downed.Contains("downedWyvern");
|
||||||
|
|
||||||
|
Sundial.Reset();
|
||||||
}
|
}
|
||||||
public override void NetSend(BinaryWriter writer)
|
public override void NetSend(BinaryWriter writer)
|
||||||
{
|
{
|
||||||
BitsByte flags = new BitsByte();
|
BitsByte flags = new BitsByte();
|
||||||
flags[0] = downedBloodshotEye; //+1 flag number for each new boss
|
flags[0] = downedBloodshotEye; //+1 flag number for each new boss
|
||||||
flags[1] = downedDuneWorm;
|
flags[1] = downedDuneWyrm;
|
||||||
flags[2] = downedArachnus;
|
flags[2] = downedArachnus;
|
||||||
flags[3] = downedWyvern;
|
flags[3] = downedWyvern;
|
||||||
writer.Write(flags);
|
writer.Write(flags);
|
||||||
@ -59,7 +59,7 @@ namespace Decimation.Content
|
|||||||
{
|
{
|
||||||
BitsByte flags = reader.ReadByte();
|
BitsByte flags = reader.ReadByte();
|
||||||
downedBloodshotEye = flags[0];
|
downedBloodshotEye = flags[0];
|
||||||
downedDuneWorm = flags[1];
|
downedDuneWyrm = flags[1];
|
||||||
downedArachnus = flags[2];
|
downedArachnus = flags[2];
|
||||||
downedWyvern = flags[3];
|
downedWyvern = flags[3];
|
||||||
}
|
}
|
||||||
@ -69,19 +69,19 @@ namespace Decimation.Content
|
|||||||
if (loadVersion == 1)
|
if (loadVersion == 1)
|
||||||
{
|
{
|
||||||
byte flags = reader.ReadByte();
|
byte flags = reader.ReadByte();
|
||||||
DecimationWorld.downedBloodshotEye = ((flags & 1) != 0);
|
downedBloodshotEye = ((flags & 1) != 0);
|
||||||
DecimationWorld.downedDuneWorm = ((flags & 2) != 0); //double flag numbers with each new boss
|
downedDuneWyrm = ((flags & 2) != 0); //double flag numbers with each new boss
|
||||||
DecimationWorld.downedArachnus = ((flags & 4) != 0);
|
downedArachnus = ((flags & 4) != 0);
|
||||||
DecimationWorld.downedWyvern = ((flags & 8) != 0);
|
downedWyvern = ((flags & 8) != 0);
|
||||||
}
|
}
|
||||||
else if (loadVersion == 2)
|
else if (loadVersion == 2)
|
||||||
{
|
{
|
||||||
byte flags = reader.ReadByte();
|
byte flags = reader.ReadByte();
|
||||||
byte flags2 = reader.ReadByte();
|
byte flags2 = reader.ReadByte();
|
||||||
DecimationWorld.downedBloodshotEye = ((flags & 1) != 0);
|
downedBloodshotEye = ((flags & 1) != 0);
|
||||||
DecimationWorld.downedDuneWorm = ((flags & 2) != 0);
|
downedDuneWyrm = ((flags & 2) != 0);
|
||||||
DecimationWorld.downedArachnus = ((flags & 4) != 0);
|
downedArachnus = ((flags & 4) != 0);
|
||||||
DecimationWorld.downedWyvern = ((flags & 8) != 0);
|
downedWyvern = ((flags & 8) != 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.width = 46;
|
item.width = 46;
|
||||||
item.height = 62;
|
item.height = 62;
|
||||||
item.rare = Rarity.LightPurple.GetRarityValue();
|
item.rare = Rarity.LightPurple.GetRarityValue();
|
||||||
this.item.value = Item.buyPrice(0, 4);
|
this.item.value = Item.sellPrice(0, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
@ -42,7 +42,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
player.npcTypeNoAggro[NPCID.Vampire] = true;
|
player.npcTypeNoAggro[NPCID.Vampire] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<EnchantedAnvil>()});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<EnchantedAnvil>()});
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.height = 62;
|
item.height = 62;
|
||||||
item.rare = Rarity.LightPurple.GetRarityValue();
|
item.rare = Rarity.LightPurple.GetRarityValue();
|
||||||
|
|
||||||
this.item.value = Item.buyPrice(0, 4);
|
this.item.value = Item.sellPrice(0, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
@ -59,7 +59,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
player.npcTypeNoAggro[NPCID.Vampire] = true;
|
player.npcTypeNoAggro[NPCID.Vampire] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
|
||||||
|
|
||||||
|
|||||||
@ -15,14 +15,14 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
|
|
||||||
protected override void InitAccessory()
|
protected override void InitAccessory()
|
||||||
{
|
{
|
||||||
item.width = 24;
|
item.width = 35;
|
||||||
item.height = 24;
|
item.height = 22;
|
||||||
item.rare = Rarity.Green.GetRarityValue();
|
item.rare = Rarity.Green.GetRarityValue();
|
||||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
item.value = Item.sellPrice(0, 0, 0, 10);
|
||||||
this.item.defense = 2;
|
item.defense = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.GlassKiln}, true);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.GlassKiln}, true);
|
||||||
|
|
||||||
@ -39,7 +39,5 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
player.AddBuff(BuffID.Thorns, 1);
|
player.AddBuff(BuffID.Thorns, 1);
|
||||||
Lighting.AddLight(player.Center, new Vector3(0.9f * 0.6f, 0.9f * 0.1f, 0.9f));
|
Lighting.AddLight(player.Center, new Vector3(0.9f * 0.6f, 0.9f * 0.1f, 0.9f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 549 B |
@ -22,10 +22,10 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.width = 30;
|
item.width = 30;
|
||||||
item.height = 30;
|
item.height = 30;
|
||||||
item.rare = Rarity.Red.GetRarityValue();
|
item.rare = Rarity.Red.GetRarityValue();
|
||||||
this.item.value = Item.buyPrice(0, 15);
|
this.item.value = Item.sellPrice(0, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
|
||||||
recipe.AddIngredient(ModContent.ItemType<JestersQuiver>());
|
recipe.AddIngredient(ModContent.ItemType<JestersQuiver>());
|
||||||
|
|||||||
@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.width = 46;
|
item.width = 46;
|
||||||
item.height = 62;
|
item.height = 62;
|
||||||
item.rare = Rarity.LightPurple.GetRarityValue();
|
item.rare = Rarity.LightPurple.GetRarityValue();
|
||||||
this.item.value = Item.buyPrice(0, 4);
|
this.item.value = Item.sellPrice(0, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
|||||||
@ -17,10 +17,10 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.width = 62;
|
item.width = 62;
|
||||||
item.height = 46;
|
item.height = 46;
|
||||||
item.rare = Rarity.Green.GetRarityValue();
|
item.rare = Rarity.Green.GetRarityValue();
|
||||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
this.item.value = Item.sellPrice(0, 0, 0, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils}, true);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils}, true);
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.width = 24;
|
item.width = 24;
|
||||||
item.height = 32;
|
item.height = 32;
|
||||||
item.rare = Rarity.Lime.GetRarityValue();
|
item.rare = Rarity.Lime.GetRarityValue();
|
||||||
this.item.value = Item.buyPrice(0, 50);
|
this.item.value = Item.sellPrice(0, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
@ -33,7 +33,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
Main.LocalPlayer.GetModPlayer<DecimationPlayer>().endlessPouchofLifeEquipped = true;
|
Main.LocalPlayer.GetModPlayer<DecimationPlayer>().endlessPouchofLifeEquipped = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
|
||||||
|
|
||||||
|
|||||||
@ -17,10 +17,10 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.width = 62;
|
item.width = 62;
|
||||||
item.height = 46;
|
item.height = 46;
|
||||||
item.rare = Rarity.Green.GetRarityValue();
|
item.rare = Rarity.Green.GetRarityValue();
|
||||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
this.item.value = Item.sellPrice(0, 0, 0, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.MythrilAnvil}, true);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.MythrilAnvil}, true);
|
||||||
|
|
||||||
|
|||||||
@ -17,10 +17,10 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.width = 54;
|
item.width = 54;
|
||||||
item.height = 46;
|
item.height = 46;
|
||||||
item.rare = Rarity.Green.GetRarityValue();
|
item.rare = Rarity.Green.GetRarityValue();
|
||||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
this.item.value = Item.sellPrice(0, 0, 0, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils}, true);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils}, true);
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
player.statDefense += 2;
|
player.statDefense += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils});
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
player.rangedCrit += 5;
|
player.rangedCrit += 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
player.thrownCrit += 3;
|
player.thrownCrit += 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.Loom }, false);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.Loom }, false);
|
||||||
|
|
||||||
|
|||||||
@ -13,11 +13,11 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
|
|
||||||
protected override void InitAccessory()
|
protected override void InitAccessory()
|
||||||
{
|
{
|
||||||
item.width = 20;
|
item.width = 32;
|
||||||
item.height = 20;
|
item.height = 32;
|
||||||
item.rare = Rarity.Rainbow.GetRarityValue();
|
item.rare = Rarity.Rainbow.GetRarityValue();
|
||||||
this.item.value = Item.buyPrice(0, 5);
|
item.value = Item.sellPrice(gold: 5);
|
||||||
this.item.expert = true;
|
item.expert = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 471 B |
@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.rare = Rarity.Green.GetRarityValue();
|
item.rare = Rarity.Green.GetRarityValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.MythrilAnvil }, false);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.MythrilAnvil }, false);
|
||||||
|
|
||||||
|
|||||||
@ -19,10 +19,10 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.width = 32;
|
item.width = 32;
|
||||||
item.height = 32;
|
item.height = 32;
|
||||||
item.rare = Rarity.Green.GetRarityValue();
|
item.rare = Rarity.Green.GetRarityValue();
|
||||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
this.item.value = Item.sellPrice(0, 0, 0, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.MythrilAnvil}, true);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.MythrilAnvil}, true);
|
||||||
|
|
||||||
|
|||||||
@ -1,36 +1,49 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.Xna.Framework;
|
using Decimation.Content.Buffs.Debuffs;
|
||||||
|
using Decimation.Lib.Items;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.DataStructures;
|
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
using Decimation.Lib.Items;
|
|
||||||
using Decimation.Lib.Util;
|
|
||||||
|
|
||||||
namespace Decimation.Content.Items.Accessories
|
namespace Decimation.Content.Items.Accessories
|
||||||
{
|
{
|
||||||
internal class RedHotShackle : DecimationAccessory
|
internal class RedHotShackle : DecimationAccessory
|
||||||
{
|
{
|
||||||
protected override string ItemName => "Red Hot Shackle";
|
protected override string ItemName => "Red Hot Shackle";
|
||||||
protected override string ItemTooltip => "WIP";
|
protected override string ItemTooltip => "Your attackers gain Singed for 6 seconds.";
|
||||||
|
|
||||||
protected override void InitAccessory()
|
protected override void InitAccessory()
|
||||||
{
|
{
|
||||||
item.width = 24;
|
item.width = 24;
|
||||||
item.height = 24;
|
item.height = 24;
|
||||||
item.rare = Rarity.Green.GetRarityValue();
|
item.rare = Rarity.Green.GetRarityValue();
|
||||||
item.value = Item.buyPrice(0, 0, 2);
|
item.value = Item.sellPrice(0, 0, 2);
|
||||||
item.defense = 1;
|
item.defense = 1;
|
||||||
}
|
}
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
|
||||||
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.Furnaces }, true);
|
player.EquipAccessory(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override List<ModRecipe> GetRecipes()
|
||||||
|
{
|
||||||
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() {TileID.Furnaces}, true);
|
||||||
|
|
||||||
recipe.AddIngredient(ItemID.Shackle);
|
recipe.AddIngredient(ItemID.Shackle);
|
||||||
recipe.AddIngredient(ItemID.Gel, 10);
|
recipe.AddIngredient(ItemID.Gel, 10);
|
||||||
|
|
||||||
return new List<ModRecipe>() { recipe };
|
return new List<ModRecipe> {recipe};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class RedHotShackleEffect : GlobalNPC
|
||||||
|
{
|
||||||
|
public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit)
|
||||||
|
{
|
||||||
|
if (target.HasEquippedAccessory(ModContent.ItemType<RedHotShackle>()))
|
||||||
|
npc.AddBuff(ModContent.BuffType<Singed>(), 600);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 381 B |
@ -14,7 +14,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.width = 30;
|
item.width = 30;
|
||||||
item.height = 28;
|
item.height = 28;
|
||||||
item.rare = Rarity.Rainbow.GetRarityValue();
|
item.rare = Rarity.Rainbow.GetRarityValue();
|
||||||
this.item.value = Item.buyPrice(0, 45);
|
this.item.value = Item.sellPrice(0, 45);
|
||||||
this.item.expert = true;
|
this.item.expert = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,10 +18,10 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.height = 24;
|
item.height = 24;
|
||||||
item.rare = Rarity.Green.GetRarityValue();
|
item.rare = Rarity.Green.GetRarityValue();
|
||||||
|
|
||||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
this.item.value = Item.sellPrice(0, 0, 0, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.WorkBenches}, true);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.WorkBenches}, true);
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
item.width = 46;
|
item.width = 46;
|
||||||
item.height = 36;
|
item.height = 36;
|
||||||
item.rare = Rarity.Rainbow.GetRarityValue();
|
item.rare = Rarity.Rainbow.GetRarityValue();
|
||||||
item.value = Item.buyPrice(0, 3);
|
item.value = Item.sellPrice(0, 3);
|
||||||
item.defense = 3;
|
item.defense = 3;
|
||||||
item.shieldSlot = 5;
|
item.shieldSlot = 5;
|
||||||
item.expert = true;
|
item.expert = true;
|
||||||
@ -40,7 +40,7 @@ namespace Decimation.Content.Items.Accessories
|
|||||||
player.accFlipper = true;
|
player.accFlipper = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()}, false);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()}, false);
|
||||||
|
|
||||||
|
|||||||
56
Content/Items/Accessories/TitanShield.cs
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
using Decimation.Content.Items.Misc.Souls;
|
||||||
|
using Decimation.Content.Items.Ores;
|
||||||
|
using Decimation.Content.Tiles;
|
||||||
|
using Decimation.Lib.Items;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Decimation.Lib.Util.Builder;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Items.Accessories
|
||||||
|
{
|
||||||
|
public class TitanShield : DecimationAccessory
|
||||||
|
{
|
||||||
|
protected override string ItemName => "Titan Shield";
|
||||||
|
|
||||||
|
protected override string ItemTooltip => "This is ridiculously heavy\n" +
|
||||||
|
"Increases defense by 10\n" +
|
||||||
|
"Increases all damages by 8%\n" +
|
||||||
|
"Increases knockback by 8%\n" +
|
||||||
|
"Increases all critical hit chances by 8%\n" +
|
||||||
|
"Absords 35% of damage taken by members of your team";
|
||||||
|
|
||||||
|
protected override void InitAccessory()
|
||||||
|
{
|
||||||
|
item.width = 34;
|
||||||
|
item.height = 40;
|
||||||
|
item.defense = 10;
|
||||||
|
item.value = Item.sellPrice(gold: 87, silver: 66);
|
||||||
|
item.rare = Rarity.Cyan.GetRarityValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
{
|
||||||
|
player.allDamage *= 1.08f;
|
||||||
|
player.meleeCrit = (int) (player.meleeCrit * 1.08f);
|
||||||
|
player.rangedCrit = (int) (player.rangedCrit * 1.08f);
|
||||||
|
player.magicCrit = (int) (player.magicCrit * 1.08f);
|
||||||
|
player.thrownCrit = (int) (player.thrownCrit * 1.08f);
|
||||||
|
|
||||||
|
player.EquipAccessory(ModContent.ItemType<TitanicPaladinShield>());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ModRecipe GetRecipe()
|
||||||
|
{
|
||||||
|
return new RecipeBuilder(this)
|
||||||
|
.WithIngredient(ModContent.ItemType<TitanicPaladinShield>())
|
||||||
|
.WithIngredient(ModContent.ItemType<TitaniteBar>(), 15)
|
||||||
|
.WithIngredient(ItemID.Ectoplasm, 50)
|
||||||
|
.WithIngredient(ModContent.ItemType<SoulofSpite>(), 20)
|
||||||
|
.WithIngredient(ModContent.ItemType<DenziumBar>(), 15)
|
||||||
|
.WithStation(ModContent.TileType<TitanForge>())
|
||||||
|
.Build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Content/Items/Accessories/TitanShield.png
Normal file
|
After Width: | Height: | Size: 589 B |
75
Content/Items/Accessories/TitanicPaladinShield.cs
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using Decimation.Content.Tiles;
|
||||||
|
using Decimation.Lib.Items;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Decimation.Lib.Util.Builder;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Items.Accessories
|
||||||
|
{
|
||||||
|
public class TitanicPaladinShield : DecimationAccessory
|
||||||
|
{
|
||||||
|
protected override string ItemName => "Titanic Paladin Shield";
|
||||||
|
|
||||||
|
protected override string ItemTooltip => "Increases defense by 8\n" +
|
||||||
|
"Increases all damage by 5%\n" +
|
||||||
|
"Increases knockback by 50%\n" +
|
||||||
|
"Enables auto-swing on all melee weapons\n" +
|
||||||
|
"Absords 30% of damage taken by members of your team";
|
||||||
|
|
||||||
|
protected override void InitAccessory()
|
||||||
|
{
|
||||||
|
item.width = 34;
|
||||||
|
item.height = 42;
|
||||||
|
item.defense = 8;
|
||||||
|
item.value = Item.sellPrice(gold: 20, silver: 60);
|
||||||
|
item.rare = Rarity.Yellow.GetRarityValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
{
|
||||||
|
player.allDamage *= 1.05f;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ModRecipe GetRecipe()
|
||||||
|
{
|
||||||
|
return new RecipeBuilder(this)
|
||||||
|
.WithIngredient(ItemID.PaladinsShield)
|
||||||
|
.WithIngredient(ItemID.TitanGlove)
|
||||||
|
.WithIngredient(ItemID.SoulofNight, 15)
|
||||||
|
.WithIngredient(ItemID.SoulofLight, 15)
|
||||||
|
.WithIngredient(ItemID.SoulofMight, 15)
|
||||||
|
.WithStation(ModContent.TileType<ChlorophyteAnvil>())
|
||||||
|
.Build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TitanicPaladinShieldItemEffect : GlobalItem
|
||||||
|
{
|
||||||
|
private static readonly Dictionary<int, bool> OriginalAutoswingState = new Dictionary<int, bool>();
|
||||||
|
|
||||||
|
public override void SetDefaults(Item item)
|
||||||
|
{
|
||||||
|
OriginalAutoswingState[item.type] = item.autoReuse;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void GetWeaponKnockback(Item item, Player player, ref float knockback)
|
||||||
|
{
|
||||||
|
if (player.HasEquippedAccessory(ModContent.ItemType<TitanicPaladinShield>()))
|
||||||
|
{
|
||||||
|
knockback *= 1.5f;
|
||||||
|
|
||||||
|
if (item.melee && !OriginalAutoswingState[item.type])
|
||||||
|
item.autoReuse = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (item.autoReuse && !OriginalAutoswingState[item.type])
|
||||||
|
item.autoReuse = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Content/Items/Accessories/TitanicPaladinShield.png
Normal file
|
After Width: | Height: | Size: 822 B |
76
Content/Items/Accessories/Trinity/Body.cs
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
using Terraria.UI.Chat;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Items.Accessories.Trinity
|
||||||
|
{
|
||||||
|
public class Body : TrinityAccessory
|
||||||
|
{
|
||||||
|
protected override string ItemName => "The Body";
|
||||||
|
|
||||||
|
protected override string ItemTooltip => "I feel all...\n" +
|
||||||
|
"Increases maximum life by 50\n" +
|
||||||
|
"Increases melee damage by 10%\n" +
|
||||||
|
"Increases melee critical hit chances by 10%\n" +
|
||||||
|
"Hostile projectiles have 10% chance to ricochet off you\nand target your enemies with 50% increased damage";
|
||||||
|
|
||||||
|
protected override void InitAccessory()
|
||||||
|
{
|
||||||
|
item.width = 10;
|
||||||
|
item.height = 16;
|
||||||
|
item.expert = true;
|
||||||
|
item.expertOnly = true;
|
||||||
|
item.rare = Rarity.Rainbow.GetRarityValue();
|
||||||
|
item.value = Item.sellPrice(gold: 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
{
|
||||||
|
player.statLifeMax2 += 50;
|
||||||
|
player.meleeDamage *= 1.10f;
|
||||||
|
player.meleeCrit = (int) (player.meleeCrit * 1.10f);
|
||||||
|
|
||||||
|
base.UpdateAccessory(player, hideVisual);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||||
|
{
|
||||||
|
tooltips.Add(new TooltipLine(mod, "trinity", "Trinity")
|
||||||
|
{
|
||||||
|
overrideColor = ChatManager.WaveColor(Color.Red)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool BodyEffect(Projectile projectile, Player player, bool fromPlayer, ref int damage)
|
||||||
|
{
|
||||||
|
if (Main.expertMode && Main.rand.NextBool(10) &&
|
||||||
|
(player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Body>()) ||
|
||||||
|
player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Trinity>())))
|
||||||
|
{
|
||||||
|
return projectile.Richochet(player, fromPlayer, ref damage);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BodyProjectileEffects : GlobalProjectile
|
||||||
|
{
|
||||||
|
public override void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit)
|
||||||
|
{
|
||||||
|
Body.BodyEffect(projectile, target, true, ref damage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit)
|
||||||
|
{
|
||||||
|
if (Body.BodyEffect(projectile, target, false, ref damage))
|
||||||
|
{
|
||||||
|
projectile.hostile = false;
|
||||||
|
projectile.friendly = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Content/Items/Accessories/Trinity/Body.png
Normal file
|
After Width: | Height: | Size: 201 B |
108
Content/Items/Accessories/Trinity/Mind.cs
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using Decimation.Content.Projectiles.Item.Accessory.Trinity;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
using Terraria.UI.Chat;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Items.Accessories.Trinity
|
||||||
|
{
|
||||||
|
public class Mind : TrinityAccessory
|
||||||
|
{
|
||||||
|
private static readonly float TrinityBeamSpeed = 8f;
|
||||||
|
private static readonly int TrinityBeamDamage = 35;
|
||||||
|
|
||||||
|
protected override string ItemName => "The Mind";
|
||||||
|
|
||||||
|
protected override string ItemTooltip => "I know all...\n" +
|
||||||
|
"Increases block placement and mining speed by 10%\n" +
|
||||||
|
"Increases ranged and thrown damage by 10%\n" +
|
||||||
|
"Increases ranged and thrown critical hit chances by 10%\n" +
|
||||||
|
"Increases view range\n" +
|
||||||
|
"Each second, there is 4% chance to fire a Trinity Beam toward a near enemy";
|
||||||
|
|
||||||
|
private int _trinityBeamCounter;
|
||||||
|
|
||||||
|
protected override void InitAccessory()
|
||||||
|
{
|
||||||
|
item.width = 10;
|
||||||
|
item.height = 16;
|
||||||
|
item.expert = true;
|
||||||
|
item.rare = Rarity.Rainbow.GetRarityValue();
|
||||||
|
item.value = Item.sellPrice(gold: 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
{
|
||||||
|
player.pickSpeed *= 1.10f;
|
||||||
|
player.tileSpeed *= 1.10f;
|
||||||
|
player.rangedDamage *= 1.10f;
|
||||||
|
player.rangedCrit = (int) (player.rangedCrit * 1.10f);
|
||||||
|
player.thrownDamage *= 1.10f;
|
||||||
|
player.thrownCrit = (int) (player.thrownCrit * 1.10f);
|
||||||
|
player.scope = true;
|
||||||
|
|
||||||
|
if (_trinityBeamCounter >= 60)
|
||||||
|
{
|
||||||
|
MindEffect(player);
|
||||||
|
_trinityBeamCounter = 0;
|
||||||
|
}
|
||||||
|
_trinityBeamCounter++;
|
||||||
|
|
||||||
|
base.UpdateAccessory(player, hideVisual);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||||
|
{
|
||||||
|
tooltips.Add(new TooltipLine(mod, "trinity", "Trinity")
|
||||||
|
{
|
||||||
|
overrideColor = ChatManager.WaveColor(Color.Yellow)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void NetSend(BinaryWriter writer)
|
||||||
|
{
|
||||||
|
writer.Write(_trinityBeamCounter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void NetRecieve(BinaryReader reader)
|
||||||
|
{
|
||||||
|
_trinityBeamCounter = reader.ReadInt32();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void MindEffect(Player player)
|
||||||
|
{
|
||||||
|
if (Main.rand.NextBool(25))
|
||||||
|
{
|
||||||
|
NPC target = null;
|
||||||
|
float lastDistance = float.MaxValue;
|
||||||
|
for (int n = 0; n < Main.npc.Length; n++)
|
||||||
|
{
|
||||||
|
NPC npcTarget = Main.npc[n];
|
||||||
|
if (npcTarget != null)
|
||||||
|
{
|
||||||
|
float distance = npcTarget.Distance(player.position);
|
||||||
|
if (npcTarget.active && !npcTarget.friendly && distance < 1000f && distance < lastDistance)
|
||||||
|
{
|
||||||
|
target = npcTarget;
|
||||||
|
lastDistance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
Vector2 velocity = target.Center - player.Center;
|
||||||
|
velocity.Normalize();
|
||||||
|
velocity *= TrinityBeamSpeed;
|
||||||
|
|
||||||
|
Projectile.NewProjectile(player.Center, velocity, ModContent.ProjectileType<TrinityBeam>(),
|
||||||
|
TrinityBeamDamage, 2f,
|
||||||
|
player.whoAmI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Content/Items/Accessories/Trinity/Mind.png
Normal file
|
After Width: | Height: | Size: 204 B |
111
Content/Items/Accessories/Trinity/Soul.cs
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
using Terraria.UI.Chat;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Items.Accessories.Trinity
|
||||||
|
{
|
||||||
|
public class Soul : TrinityAccessory
|
||||||
|
{
|
||||||
|
protected override string ItemName => "The Soul";
|
||||||
|
protected override string ItemTooltip => "I am all...\n" +
|
||||||
|
"Increases maximum mana by 50\n" +
|
||||||
|
"Increases magic and minion damage by 10%\n" +
|
||||||
|
"Increases magic critical hit chances by 10%\n" +
|
||||||
|
"Increases minions knockback by 10%" +
|
||||||
|
"Criticals hits leech mana\n" +
|
||||||
|
"Hostile projectiles have 10% chance to phase through you,\nnegating all damage and causing your next attack to be a critical hit";
|
||||||
|
|
||||||
|
protected override void InitAccessory()
|
||||||
|
{
|
||||||
|
item.width = 10;
|
||||||
|
item.height = 16;
|
||||||
|
item.expert = true;
|
||||||
|
item.rare = Rarity.Rainbow.GetRarityValue();
|
||||||
|
item.value = Item.sellPrice(gold: 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
{
|
||||||
|
player.statManaMax2 += 50;
|
||||||
|
player.magicDamage *= 1.10f;
|
||||||
|
player.magicCrit *= (int) (player.magicCrit * 1.10f);
|
||||||
|
player.minionDamage *= 1.10f;
|
||||||
|
player.minionKB *= 1.10f;
|
||||||
|
|
||||||
|
base.UpdateAccessory(player, hideVisual);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||||
|
{
|
||||||
|
tooltips.Add(new TooltipLine(mod, "trinity", "Trinity")
|
||||||
|
{
|
||||||
|
overrideColor = ChatManager.WaveColor(Color.Blue)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SoulHitEffect(Player target, ref int damage)
|
||||||
|
{
|
||||||
|
DecimationPlayer targetModPlayer = target.GetModPlayer();
|
||||||
|
if (Main.rand.NextBool(10) && (targetModPlayer.HasEquippedAccessory(ModContent.ItemType<Soul>()) || targetModPlayer.HasEquippedAccessory(ModContent.ItemType<Trinity>())))
|
||||||
|
{
|
||||||
|
damage = 0;
|
||||||
|
targetModPlayer.NextHitCrit = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SoulEffect(Player player, Entity target, bool crit)
|
||||||
|
{
|
||||||
|
if (crit && player.GetModPlayer().HasEquippedAccessory(ModContent.ItemType<Soul>()))
|
||||||
|
{
|
||||||
|
player.LeechMana(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SoulItemEffects : GlobalItem
|
||||||
|
{
|
||||||
|
public override void OnHitNPC(Item item, Player player, NPC target, int damage, float knockBack, bool crit)
|
||||||
|
{
|
||||||
|
Soul.SoulEffect(player, target, crit);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnHitPvp(Item item, Player player, Player target, int damage, bool crit)
|
||||||
|
{
|
||||||
|
Soul.SoulEffect(player, target, crit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SoulProjectileEffects : GlobalProjectile
|
||||||
|
{
|
||||||
|
public override void OnHitNPC(Projectile projectile, NPC target, int damage, float knockback, bool crit)
|
||||||
|
{
|
||||||
|
Player owner = Main.player[projectile.owner];
|
||||||
|
if (owner != null && owner.active && !owner.dead)
|
||||||
|
{
|
||||||
|
Soul.SoulEffect(owner, target, crit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnHitPvp(Projectile projectile, Player target, int damage, bool crit)
|
||||||
|
{
|
||||||
|
Player owner = Main.player[projectile.owner];
|
||||||
|
if (owner != null && owner.active && !owner.dead)
|
||||||
|
{
|
||||||
|
Soul.SoulEffect(owner, target, crit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit)
|
||||||
|
{
|
||||||
|
Soul.SoulHitEffect(target, ref damage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit)
|
||||||
|
{
|
||||||
|
Soul.SoulHitEffect(target, ref damage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Content/Items/Accessories/Trinity/Soul.png
Normal file
|
After Width: | Height: | Size: 201 B |
115
Content/Items/Accessories/Trinity/Trinity.cs
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using Decimation.Content.Items.Misc.ConcentratedSouls;
|
||||||
|
using Decimation.Content.Tiles;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Decimation.Lib.Util.Builder;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
using Terraria.UI.Chat;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Items.Accessories.Trinity
|
||||||
|
{
|
||||||
|
public class Trinity : TrinityAccessory
|
||||||
|
{
|
||||||
|
protected override string ItemName => "The Trinity";
|
||||||
|
|
||||||
|
protected override string ItemTooltip => "True Equilibrium...\n" +
|
||||||
|
"Increases maximum life by 50\n" +
|
||||||
|
"Increases maximum mana by 50\n" +
|
||||||
|
"Increases all damage by 10%\n" +
|
||||||
|
"Increases all critical hit chances by 10%\n" +
|
||||||
|
"Increases minions knockback by 10%\n" +
|
||||||
|
"Increases view range\n" +
|
||||||
|
"Each second, there is 4% chance to fire a Trinity Beam toward a near enemy\n" +
|
||||||
|
"Criticals hits leech mana\n" +
|
||||||
|
"Hostile projectiles have 10% chance to phase through you,\nnegating all damage and causing your next attack to be a critical hit\n" +
|
||||||
|
"Hostile projectiles have 10% chance to ricochet off you\nand target your enemies with 50% increased damage";
|
||||||
|
|
||||||
|
private int _trinityBeamCounter;
|
||||||
|
|
||||||
|
protected override void InitAccessory()
|
||||||
|
{
|
||||||
|
item.width = 34;
|
||||||
|
item.height = 28;
|
||||||
|
item.expert = true;
|
||||||
|
item.value = Item.sellPrice(gold: 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
{
|
||||||
|
// Soul
|
||||||
|
player.statManaMax2 += 50;
|
||||||
|
player.magicDamage *= 1.10f;
|
||||||
|
player.magicCrit *= (int) (player.magicCrit * 1.10f);
|
||||||
|
player.minionDamage *= 1.10f;
|
||||||
|
player.minionKB *= 1.10f;
|
||||||
|
|
||||||
|
// Body
|
||||||
|
player.statLifeMax2 += 50;
|
||||||
|
player.meleeDamage *= 1.10f;
|
||||||
|
player.meleeCrit = (int) (player.meleeCrit * 1.10f);
|
||||||
|
|
||||||
|
// Mind
|
||||||
|
player.pickSpeed *= 1.10f;
|
||||||
|
player.tileSpeed *= 1.10f;
|
||||||
|
player.rangedDamage *= 1.10f;
|
||||||
|
player.rangedCrit = (int) (player.rangedCrit * 1.10f);
|
||||||
|
player.thrownDamage *= 1.10f;
|
||||||
|
player.thrownCrit = (int) (player.thrownCrit * 1.10f);
|
||||||
|
player.scope = true;
|
||||||
|
|
||||||
|
if (_trinityBeamCounter >= 60)
|
||||||
|
{
|
||||||
|
Mind.MindEffect(player);
|
||||||
|
_trinityBeamCounter = 0;
|
||||||
|
}
|
||||||
|
_trinityBeamCounter++;
|
||||||
|
|
||||||
|
player.EquipAccessory(ModContent.ItemType<Body>());
|
||||||
|
player.EquipAccessory(ModContent.ItemType<Soul>());
|
||||||
|
player.EquipAccessory(ModContent.ItemType<Mind>());
|
||||||
|
|
||||||
|
base.UpdateAccessory(player, hideVisual);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||||
|
{
|
||||||
|
tooltips.Add(new TooltipLine(mod, "trinity", "Trinity")
|
||||||
|
{
|
||||||
|
overrideColor = ChatManager.WaveColor(Color.Orange)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void NetSend(BinaryWriter writer)
|
||||||
|
{
|
||||||
|
writer.Write(_trinityBeamCounter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void NetRecieve(BinaryReader reader)
|
||||||
|
{
|
||||||
|
_trinityBeamCounter = reader.ReadInt32();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ModRecipe GetRecipe()
|
||||||
|
{
|
||||||
|
return new RecipeBuilder(this)
|
||||||
|
.WithIngredient(ModContent.ItemType<Body>())
|
||||||
|
.WithIngredient(ModContent.ItemType<Soul>())
|
||||||
|
.WithIngredient(ModContent.ItemType<Mind>())
|
||||||
|
.WithIngredient(ModContent.ItemType<ConcentratedFlight>())
|
||||||
|
.WithIngredient(ModContent.ItemType<ConcentratedMight>())
|
||||||
|
.WithIngredient(ModContent.ItemType<ConcentratedSight>())
|
||||||
|
.WithIngredient(ModContent.ItemType<ConcentratedFright>())
|
||||||
|
.WithIngredient(ModContent.ItemType<ConcentratedLife>())
|
||||||
|
.WithIngredient(ModContent.ItemType<ConcentratedTime>())
|
||||||
|
.WithIngredient(ModContent.ItemType<ConcentratedNight>())
|
||||||
|
.WithIngredient(ModContent.ItemType<ConcentratedLight>())
|
||||||
|
.WithIngredient(ItemID.HallowedBar, 10)
|
||||||
|
.WithStation(ModContent.TileType<ChlorophyteAnvil>())
|
||||||
|
.Build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Content/Items/Accessories/Trinity/Trinity.png
Normal file
|
After Width: | Height: | Size: 504 B |
47
Content/Items/Accessories/Trinity/TrinityAccessory.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using Decimation.Lib.Items;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
using Terraria.Utilities;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Items.Accessories.Trinity
|
||||||
|
{
|
||||||
|
public abstract class TrinityAccessory : DecimationAccessory
|
||||||
|
{
|
||||||
|
public override bool CanEquipAccessory(Player player, int slot)
|
||||||
|
{
|
||||||
|
return !player.HasEquippedAccessory(ModContent.ItemType<Body>()) &&
|
||||||
|
!player.HasEquippedAccessory(ModContent.ItemType<Soul>()) &&
|
||||||
|
!player.HasEquippedAccessory(ModContent.ItemType<Mind>()) &&
|
||||||
|
!player.HasEquippedAccessory(ModContent.ItemType<Trinity>());
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool? PrefixChance(int pre, UnifiedRandom rand)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TrinityBossBagEffects : GlobalItem
|
||||||
|
{
|
||||||
|
public override void OpenVanillaBag(string context, Player player, int arg)
|
||||||
|
{
|
||||||
|
if (context == "bossBag")
|
||||||
|
{
|
||||||
|
switch (arg)
|
||||||
|
{
|
||||||
|
case ItemID.TwinsBossBag:
|
||||||
|
player.QuickSpawnItem(ModContent.ItemType<Mind>());
|
||||||
|
break;
|
||||||
|
case ItemID.DestroyerBossBag:
|
||||||
|
player.QuickSpawnItem(ModContent.ItemType<Body>());
|
||||||
|
break;
|
||||||
|
case ItemID.SkeletronPrimeBossBag:
|
||||||
|
player.QuickSpawnItem(ModContent.ItemType<Soul>());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
56
Content/Items/Accessories/VeilOfVengeance.cs
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
using Decimation.Lib.Items;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Decimation.Lib.Util.Builder;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Items.Accessories
|
||||||
|
{
|
||||||
|
public class VeilOfVengeance : DecimationAccessory
|
||||||
|
{
|
||||||
|
protected override string ItemName => "Veil of Vengeance";
|
||||||
|
|
||||||
|
protected override string ItemTooltip => "Increases length of invincibility after taking damage\n" +
|
||||||
|
"Causes stars to fall after taking damage\n" +
|
||||||
|
"Releases wasps and increase movement speed after taking damage\n" +
|
||||||
|
"Attackers have 20% chances to be poisoned";
|
||||||
|
|
||||||
|
protected override void InitAccessory()
|
||||||
|
{
|
||||||
|
item.width = 26;
|
||||||
|
item.height = 32;
|
||||||
|
item.value = Item.sellPrice(gold: 19, silver: 70);
|
||||||
|
item.rare = Rarity.LightPurple.GetRarityValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
{
|
||||||
|
player.longInvince = true;
|
||||||
|
player.starCloak = true;
|
||||||
|
|
||||||
|
base.UpdateAccessory(player, hideVisual);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ModRecipe GetRecipe()
|
||||||
|
{
|
||||||
|
return new RecipeBuilder(this)
|
||||||
|
.WithIngredient(ModContent.ItemType<WaspNecklace>())
|
||||||
|
.WithIngredient(ItemID.StarVeil)
|
||||||
|
.WithIngredient(ItemID.SoulofMight, 20)
|
||||||
|
.WithStation(TileID.TinkerersWorkbench)
|
||||||
|
.Build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class VeilofVengeancePoisonEffect : GlobalNPC
|
||||||
|
{
|
||||||
|
public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit)
|
||||||
|
{
|
||||||
|
if (target.HasEquippedAccessory(ModContent.ItemType<VeilOfVengeance>()) && Main.rand.NextBool(5))
|
||||||
|
npc.AddBuff(BuffID.Poisoned, 300);
|
||||||
|
|
||||||
|
base.OnHitPlayer(npc, target, damage, crit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Content/Items/Accessories/VeilOfVengeance.png
Normal file
|
After Width: | Height: | Size: 519 B |
46
Content/Items/Accessories/WaspNecklace.cs
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
using Decimation.Lib.Items;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Decimation.Lib.Util.Builder;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Items.Accessories
|
||||||
|
{
|
||||||
|
public class WaspNecklace : DecimationAccessory
|
||||||
|
{
|
||||||
|
protected override string ItemName => "Wasp Necklace";
|
||||||
|
|
||||||
|
protected override string ItemTooltip => "Releases wasps and increase movement speed after taking damage\n" +
|
||||||
|
"Attackers have 20% chances to be poisoned";
|
||||||
|
|
||||||
|
protected override void InitAccessory()
|
||||||
|
{
|
||||||
|
item.width = 32;
|
||||||
|
item.height = 32;
|
||||||
|
item.value = Item.sellPrice(gold: 1, silver: 70);
|
||||||
|
item.rare = Rarity.Green.GetRarityValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ModRecipe GetRecipe()
|
||||||
|
{
|
||||||
|
return new RecipeBuilder(this)
|
||||||
|
.WithIngredient(ItemID.SweetheartNecklace)
|
||||||
|
.WithIngredient(ModContent.ItemType<WaspNest>())
|
||||||
|
.WithStation(TileID.TinkerersWorkbench)
|
||||||
|
.Build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class WaspNecklacePoisonEffect : GlobalNPC
|
||||||
|
{
|
||||||
|
public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit)
|
||||||
|
{
|
||||||
|
if (target.HasEquippedAccessory(ModContent.ItemType<WaspNecklace>()) && Main.rand.NextBool(5))
|
||||||
|
npc.AddBuff(BuffID.Poisoned, 300);
|
||||||
|
|
||||||
|
base.OnHitPlayer(npc, target, damage, crit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
BIN
Content/Items/Accessories/WaspNecklace.png
Normal file
|
After Width: | Height: | Size: 471 B |
51
Content/Items/Accessories/WaspNest.cs
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
using Decimation.Lib.Items;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Decimation.Lib.Util.Builder;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Items.Accessories
|
||||||
|
{
|
||||||
|
public class WaspNest : DecimationAccessory
|
||||||
|
{
|
||||||
|
protected override string ItemName => "Wasp Nest";
|
||||||
|
protected override string ItemTooltip => "Attackers also take damage\n" +
|
||||||
|
"Attackers have 50% chances to be poisoned";
|
||||||
|
|
||||||
|
protected override void InitAccessory()
|
||||||
|
{
|
||||||
|
item.width = 32;
|
||||||
|
item.height = 30;
|
||||||
|
item.value = Item.sellPrice(silver: 10);
|
||||||
|
item.rare = Rarity.Blue.GetRarityValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
{
|
||||||
|
player.AddBuff(BuffID.Thorns, 600);
|
||||||
|
|
||||||
|
base.UpdateAccessory(player, hideVisual);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ModRecipe GetRecipe()
|
||||||
|
{
|
||||||
|
return new RecipeBuilder(this)
|
||||||
|
.WithIngredient(ItemID.BeeWax, 10)
|
||||||
|
.WithIngredient(ItemID.Stinger, 15)
|
||||||
|
.WithIngredient(ItemID.BottledHoney)
|
||||||
|
.WithStation(TileID.WorkBenches)
|
||||||
|
.Build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class WaspNestPoisonEffect : GlobalNPC
|
||||||
|
{
|
||||||
|
public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit)
|
||||||
|
{
|
||||||
|
if (target.HasEquippedAccessory(ModContent.ItemType<WaspNest>()) && Main.rand.NextBool(2))
|
||||||
|
npc.AddBuff(BuffID.Poisoned, 600);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
BIN
Content/Items/Accessories/WaspNest.png
Normal file
|
After Width: | Height: | Size: 594 B |
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Decimation.Content.Items.Misc.CondensedSouls;
|
using Decimation.Content.Items.Misc.ConcentratedSouls;
|
||||||
using Decimation.Content.Items.Ores;
|
using Decimation.Content.Items.Ores;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles.Item.Accessory;
|
||||||
using Decimation.Content.Tiles;
|
using Decimation.Content.Tiles;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
using Decimation.Lib.Util;
|
||||||
@ -24,16 +24,16 @@ namespace Decimation.Content.Items.Accessories.Wings
|
|||||||
item.height = 26;
|
item.height = 26;
|
||||||
item.rare = Rarity.Red.GetRarityValue();
|
item.rare = Rarity.Red.GetRarityValue();
|
||||||
|
|
||||||
this.item.value = Item.buyPrice(0, 5);
|
this.item.value = Item.sellPrice(0, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
{
|
{
|
||||||
player.wingTimeMax = 240;
|
player.wingTimeMax = 240;
|
||||||
Lighting.AddLight((int)(player.position.X + player.width / 2f) / 16,
|
Lighting.AddLight((int) (player.position.X + player.width / 2f) / 16,
|
||||||
(int)(player.position.Y + player.height / 2f) / 16, 1.05f, 0.95f, 0.55f);
|
(int) (player.position.Y + player.height / 2f) / 16, 1.05f, 0.95f, 0.55f);
|
||||||
|
|
||||||
if ((int)player.wingTime % 2 == 1)
|
if ((int) player.wingTime % 2 == 1)
|
||||||
Projectile.NewProjectile(player.Center, new Vector2(0, 0), ModContent.ProjectileType<Ember>(), 25, 5,
|
Projectile.NewProjectile(player.Center, new Vector2(0, 0), ModContent.ProjectileType<Ember>(), 25, 5,
|
||||||
player.whoAmI);
|
player.whoAmI);
|
||||||
}
|
}
|
||||||
@ -54,16 +54,16 @@ namespace Decimation.Content.Items.Accessories.Wings
|
|||||||
acceleration *= 2.5f;
|
acceleration *= 2.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> { ModContent.TileType<TitanForge>() });
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<TitanForge>()});
|
||||||
|
|
||||||
recipe.AddIngredient(ItemID.BeetleWings);
|
recipe.AddIngredient(ItemID.BeetleWings);
|
||||||
recipe.AddIngredient(ItemID.WingsSolar);
|
recipe.AddIngredient(ItemID.WingsSolar);
|
||||||
recipe.AddIngredient(ModContent.ItemType<CondensedSpite>(), 2);
|
recipe.AddIngredient(ModContent.ItemType<ConcentratedSpite>(), 2);
|
||||||
recipe.AddIngredient(ModContent.ItemType<DenziumBar>(), 5);
|
recipe.AddIngredient(ModContent.ItemType<DenziumBar>(), 5);
|
||||||
|
|
||||||
return new List<ModRecipe> { recipe };
|
return new List<ModRecipe> {recipe};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -24,7 +24,7 @@ namespace Decimation.Content.Items.Ammo
|
|||||||
item.height = 8;
|
item.height = 8;
|
||||||
item.knockBack = 1;
|
item.knockBack = 1;
|
||||||
item.rare = Rarity.Orange.GetRarityValue();
|
item.rare = Rarity.Orange.GetRarityValue();
|
||||||
item.value = Item.buyPrice(0, 0, 10);
|
item.value = Item.sellPrice(0, 0, 10);
|
||||||
item.consumable = true;
|
item.consumable = true;
|
||||||
|
|
||||||
this.item.shootSpeed = 2f;
|
this.item.shootSpeed = 2f;
|
||||||
@ -40,7 +40,7 @@ namespace Decimation.Content.Items.Ammo
|
|||||||
player.AddBuff(ModContent.BuffType<Singed>(), 600);
|
player.AddBuff(ModContent.BuffType<Singed>(), 600);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 50, new List<int> {ModContent.TileType<TitanForge>()});
|
ModRecipe recipe = GetNewModRecipe(this, 50, new List<int> {ModContent.TileType<TitanForge>()});
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Decimation.Content.Buffs.Debuffs;
|
using Decimation.Content.Buffs.Debuffs;
|
||||||
|
using Decimation.Content.Buffs.Buffs;
|
||||||
using Decimation.Content.Items.Ores;
|
using Decimation.Content.Items.Ores;
|
||||||
using Decimation.Content.Tiles;
|
using Decimation.Content.Tiles;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
@ -10,9 +11,9 @@ using Terraria.ModLoader;
|
|||||||
|
|
||||||
namespace Decimation.Content.Items.Ammo
|
namespace Decimation.Content.Items.Ammo
|
||||||
{
|
{
|
||||||
internal class TitanicStyngerBolt : DecimationAmmo
|
internal class ScytheStyngerBolt : DecimationAmmo
|
||||||
{
|
{
|
||||||
protected override string ItemName => "Titanic Stynger Bolt";
|
protected override string ItemName => "The Scythe Stynger Bolt";
|
||||||
protected override string ItemTooltip => "Explodes into deadly shrapnel.";
|
protected override string ItemTooltip => "Explodes into deadly shrapnel.";
|
||||||
protected override string Projectile => "TitanicStyngerBolt";
|
protected override string Projectile => "TitanicStyngerBolt";
|
||||||
protected override int Ammo => AmmoID.StyngerBolt;
|
protected override int Ammo => AmmoID.StyngerBolt;
|
||||||
@ -24,7 +25,7 @@ namespace Decimation.Content.Items.Ammo
|
|||||||
item.rare = Rarity.Orange.GetRarityValue();
|
item.rare = Rarity.Orange.GetRarityValue();
|
||||||
item.width = 8;
|
item.width = 8;
|
||||||
item.height = 8;
|
item.height = 8;
|
||||||
item.value = Item.buyPrice(0, 0, 10);
|
item.value = Item.sellPrice(0, 0, 10);
|
||||||
item.consumable = true;
|
item.consumable = true;
|
||||||
|
|
||||||
this.item.shootSpeed = 2f;
|
this.item.shootSpeed = 2f;
|
||||||
@ -42,7 +43,7 @@ namespace Decimation.Content.Items.Ammo
|
|||||||
target.AddBuff(ModContent.BuffType<Amnesia>(), 600);
|
target.AddBuff(ModContent.BuffType<Amnesia>(), 600);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 50, new List<int> {ModContent.TileType<TitanForge>()});
|
ModRecipe recipe = GetNewModRecipe(this, 50, new List<int> {ModContent.TileType<TitanForge>()});
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
@ -20,12 +20,12 @@ namespace Decimation.Content.Items.Ammo
|
|||||||
item.knockBack = 2;
|
item.knockBack = 2;
|
||||||
item.width = 14;
|
item.width = 14;
|
||||||
item.height = 32;
|
item.height = 32;
|
||||||
item.value = Item.buyPrice(0, 0, 0, 55);
|
item.value = Item.sellPrice(0, 0, 0, 55);
|
||||||
|
|
||||||
this.item.shootSpeed = 2.5f;
|
this.item.shootSpeed = 2.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils});
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 343 B |
@ -26,7 +26,7 @@ namespace Decimation.Content.Items.Amulets
|
|||||||
(int) (player.position.Y + player.height / 2f) / 16, 1.05f, 0.95f, 0.55f);
|
(int) (player.position.Y + player.height / 2f) / 16, 1.05f, 0.95f, 0.55f);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench}, true);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench}, true);
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ namespace Decimation.Content.Items.Amulets
|
|||||||
(int) (player.position.Y + player.height / 2f) / 16, 1, 1, 1);
|
(int) (player.position.Y + player.height / 2f) / 16, 1, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ namespace Decimation.Content.Items.Amulets
|
|||||||
player.magicCrit += 3;
|
player.magicCrit += 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Decimation.Content.Buffs.Debuffs;
|
using Decimation.Content.Buffs.Debuffs;
|
||||||
using Decimation.Lib.Amulets;
|
|
||||||
using Decimation.Lib.Amulets.Synergy;
|
|
||||||
using Decimation.Content.Items.Accessories;
|
using Decimation.Content.Items.Accessories;
|
||||||
using Decimation.Content.Synergies;
|
using Decimation.Content.Synergies;
|
||||||
|
using Decimation.Lib.Amulets;
|
||||||
|
using Decimation.Lib.Amulets.Synergy;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
@ -34,7 +34,7 @@ namespace Decimation.Content.Items.Amulets
|
|||||||
modPlayer.amuletsBuffTime = 300;
|
modPlayer.amuletsBuffTime = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||||
|
|
||||||
@ -53,8 +53,10 @@ namespace Decimation.Content.Items.Amulets
|
|||||||
.AddEffect("+3% melee damages")
|
.AddEffect("+3% melee damages")
|
||||||
.AddEffect("+3% melee critical strike chances")
|
.AddEffect("+3% melee critical strike chances")
|
||||||
.AddEffect("+7 seconds of immunity to lava")
|
.AddEffect("+7 seconds of immunity to lava")
|
||||||
.AddEffect("+4% chances to inflict \"Slimed!\" debuff to ennemies on strikes")
|
.AddEffect("+4% chances to inflict \"Singed\" debuff to ennemies on strikes")
|
||||||
.AddSynergy("The lava charm grant an additional 5 seconds of lava immunity");
|
.AddSynergy("Grants an additional 5 seconds of effect to lava immunity accessories")
|
||||||
|
.AddSynergy("Fire melee weapons inflicts \"Singed\" to ennemies on strikes")
|
||||||
|
.AddSynergy("The Fiery Greatsword shoots fireballs");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -22,7 +22,7 @@ namespace Decimation.Content.Items.Amulets
|
|||||||
player.rangedCrit += 3;
|
player.rangedCrit += 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ namespace Decimation.Content.Items.Amulets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ namespace Decimation.Content.Items.Amulets
|
|||||||
Item.NewItem(new Vector2(player.position.X, player.position.Y), ModContent.ItemType<EnchantedHeart>());
|
Item.NewItem(new Vector2(player.position.X, player.position.Y), ModContent.ItemType<EnchantedHeart>());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ namespace Decimation.Content.Items.Amulets
|
|||||||
modPlayer.amuletsBuffWhenAttacking = true;
|
modPlayer.amuletsBuffWhenAttacking = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ namespace Decimation.Content.Items.Amulets
|
|||||||
(int) (player.position.Y + player.height / 2f) / 16, 1, 1, 1);
|
(int) (player.position.Y + player.height / 2f) / 16, 1, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench}, true);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench}, true);
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ namespace Decimation.Content.Items.Amulets
|
|||||||
modPlayer.amuletsBuffTime = 300;
|
modPlayer.amuletsBuffTime = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> { TileID.TinkerersWorkbench }, true);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> { TileID.TinkerersWorkbench }, true);
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ namespace Decimation.Content.Items.Armors.ScarabArmor
|
|||||||
player.noKnockback = true;
|
player.noKnockback = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { ModContent.TileType<TitanForge>() }, false);
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { ModContent.TileType<TitanForge>() }, false);
|
||||||
|
|
||||||
|
|||||||
@ -118,7 +118,7 @@ namespace Decimation.Content.Items.Armors.ScarabArmor
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<TitanForge>()});
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<TitanForge>()});
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ namespace Decimation.Content.Items.Armors.ScarabArmor
|
|||||||
player.fireWalk = true;
|
player.fireWalk = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
protected override List<ModRecipe> GetRecipes()
|
||||||
{
|
{
|
||||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { ModContent.TileType<TitanForge>() });
|
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { ModContent.TileType<TitanForge>() });
|
||||||
|
|
||||||
|
|||||||