Compare commits

..

119 Commits

Author SHA1 Message Date
FyloZ
66e8daedec Updated the Mind. 2020-07-20 16:39:39 -04:00
FyloZ
a2935f61ce Added Soul of Spite to underworld drops with 20% chance (36% expert) after Plantera 2020-07-20 16:16:28 -04:00
FyloZ
2fb91f2390 Added Soul of Spite to underworld drops with 20% chance (36% expert) 2020-07-20 16:15:47 -04:00
FyloZ
01a4ad3dea Added Titanic Paladin Shield
Added Titan Shield
2020-07-20 16:06:07 -04:00
FyloZ
82f501db45 Renamed the Titanic Pike. 2020-07-20 11:47:02 -04:00
FyloZ
9a527a0973 Updated souls sprites. 2020-07-20 11:43:44 -04:00
FyloZ
923c05a70a Fixed possible Timekeeper crash if the sibling projectile doesn't exists anymore. 2020-07-19 22:51:57 -04:00
FyloZ
f188eb2757 Fixed Timekeeper crash? 2020-07-19 22:40:17 -04:00
FyloZ
847841c181 Updated The Scythe 2020-07-19 19:17:47 -04:00
FyloZ
a14c036ffb Fixed Timekeeper crash. 2020-07-19 19:10:21 -04:00
FyloZ
3eeb1c8ff2 Fixed Timekeeper crash. 2020-07-19 19:08:36 -04:00
FyloZ
8091c18e7d Added trinity items to Trinity recipe. 2020-07-19 19:06:10 -04:00
FyloZ
56de9e29e1 Added new axes. 2020-07-19 19:05:58 -04:00
FyloZ
391f089c93 Added Trinity's recipe. 2020-07-15 12:06:05 -04:00
FyloZ
acc592b251 Updated souls.
Added all Concentrated Souls.
2020-07-15 12:01:13 -04:00
FyloZ
0cf76d5270 Organized projectiles.
Updated The Mind trinity item.
2020-07-14 22:31:26 -04:00
FyloZ
df5b7c2b43 Added The Trinity. 2020-07-13 15:22:20 -04:00
FyloZ
e61040d1e5 Added Trinity items drop.
Prevent Prefix on Trinity items.
2020-07-13 14:59:58 -04:00
FyloZ
8ea2e21eb6 Added The Mind trinity item. 2020-07-13 14:43:31 -04:00
FyloZ
4636e76d76 Added minion damages to The Soul. 2020-07-13 12:30:51 -04:00
FyloZ
803bda060b Added The Soul trinity item. 2020-07-13 12:27:29 -04:00
FyloZ
3e441699c9 Fixed The Body not ricocheting projectiles. 2020-07-13 11:29:12 -04:00
FyloZ
326f22714f Added The Body trinity item. 2020-07-13 00:13:28 -04:00
FyloZ
b3585374fe Finished Skeleton NPC.
Finished Necro Caster.
2020-07-11 13:50:40 -04:00
FyloZ
ccf993c077 Updated Skeleton Town NPC. 2020-07-11 13:23:16 -04:00
FyloZ
e4efb00c5c Updated Slimer sound. 2020-07-11 12:08:37 -04:00
FyloZ
44e51d8629 Fixed Shrine Altar not generating anymore. 2020-07-11 12:00:13 -04:00
FyloZ
a08caa0d16 Updated Shrine Door's sprite 2020-07-11 11:56:35 -04:00
FyloZ
e4ba4d4277 Updated Talonian Pillar's sprite.
Updated Hour Glass.
2020-07-11 11:49:24 -04:00
FyloZ
4c08d18a6f Fixed Red Hot Spikes tile sprite. 2020-07-11 11:33:34 -04:00
FyloZ
ff1ffcdfbe Updated Magma Ball sprites. 2020-07-09 21:57:29 -04:00
FyloZ
6dcf23b6c8 Updated Hour Glass sprite's. (Animation broken when holding out) 2020-07-09 19:59:07 -04:00
FyloZ
6db71f1c36 Updated Necro Caster's sprite.
Fixed the Bone projectile hurt the Necro Caster's.
2020-07-09 19:53:29 -04:00
FyloZ
e14436efd7 Updated the Sling. 2020-07-09 19:49:02 -04:00
FyloZ
70f3ccf445 Updated Titan Forge's item. 2020-07-09 19:46:40 -04:00
FyloZ
e1ceffac89 Updated Wooden Slingshot. 2020-07-09 19:38:24 -04:00
FyloZ
3852419581 Updated Multigrain Sword. 2020-07-09 19:34:11 -04:00
FyloZ
266a82b74a Updated Greatwood Sword. 2020-07-09 19:30:05 -04:00
FyloZ
3626b5fa07 Updated Multigrain Hammer. 2020-07-09 19:26:57 -04:00
FyloZ
67b3937c75 Updated Greatwood Hammer. 2020-07-09 19:25:56 -04:00
FyloZ
eeabb41dd6 Updated Glided Sickle. 2020-07-09 19:19:13 -04:00
FyloZ
884e67c5e2 Updated some potions's sprite.
Changed buy price to sell price.
2020-07-09 18:03:44 -04:00
FyloZ
dd5726acf5 Updated Antidote's sprite. 2020-07-09 17:41:36 -04:00
FyloZ
2033aa88a9 Updated Wasp Necklace's sprite. 2020-07-09 17:37:10 -04:00
FyloZ
1879d58994 Updated some debuff's sprites 2020-07-09 17:35:34 -04:00
FyloZ
782e6a6582 Fixed tiles dropped a lot of items.
Updated enchanted anvil.
2020-07-09 17:08:49 -04:00
FyloZ
e2f2c82ada Updated Red Hot Spikes. (Sprite need fixes) 2020-07-09 16:06:59 -04:00
FyloZ
57423952bf Fixed items were always consumed.
Added possibility to add light to tiles.
Updated Shrine Altar's sprite.
2020-07-09 15:47:54 -04:00
FyloZ
f106ab2738 Updated Shrine Bricks. 2020-07-09 14:33:18 -04:00
FyloZ
71430b610f Updated Talonian Pillar's tile sprite. (Sprite need small fixes) 2020-07-08 22:36:54 -04:00
FyloZ
a66c4e48ac Updated Titan Forge. 2020-07-08 22:24:00 -04:00
FyloZ
2f32c4d775 Updated Titanite Bar's sprite. 2020-07-08 20:54:53 -04:00
FyloZ
5b23355b93 Finished the Hour Hand. 2020-07-06 21:22:34 -04:00
FyloZ
c6ec7a0208 Updated the Hour Hand. 2020-07-06 20:53:39 -04:00
FyloZ
c8b07494c3 Rewrote AI of the Core Spider (wall). 2020-07-06 15:18:38 -04:00
FyloZ
aa893193de Rewrote AI of the Core Spider (ground). 2020-07-06 14:11:49 -04:00
FyloZ
ccf33456d9 Updated Living Magma's sprite.
Added new Living Magma behavior.
Added the Tiny Living Magma.
2020-07-05 15:20:24 -04:00
FyloZ
3a9de1cc98 Fixed the core spider didn't shoot in the right direction. 2020-07-05 11:13:51 -04:00
FyloZ
543a683b6c Updated Core Spider's sprite. 2020-07-01 20:47:20 -04:00
FyloZ
317b3759c8 Finished the Sundial.
Added tooltips to the Staff of Shifting Sands and the Timekeeper.
2020-07-01 12:02:21 -04:00
FyloZ
4b1af70d9b Updated Dead Earth's sprite. 2020-06-30 16:06:00 -04:00
FyloZ
27cc2cee02 Updated Bloodied Essence's sprite. 2020-06-30 16:04:34 -04:00
FyloZ
33fe5a6189 Updated Denzium Ore's sprite. 2020-06-30 16:01:02 -04:00
FyloZ
2f91c6da96 Updated Denzium Bar's sprite. 2020-06-30 15:59:57 -04:00
FyloZ
fff5416b23 Updated Denzium Ore's tile sprite. 2020-06-30 15:59:12 -04:00
FyloZ
c622092092 Updated Titanic Repeater's sprite. 2020-06-30 15:55:26 -04:00
FyloZ
60af568958 Updated Titanic Pike's sprite. 2020-06-30 15:54:17 -04:00
FyloZ
7c760fc0f5 Updated Titanic Longsword's sprite. 2020-06-30 15:49:00 -04:00
FyloZ
aa77486a6a Updated Chlorophyte Anvil's sprite. 2020-06-30 15:47:49 -04:00
FyloZ
186e69d9a5 Updated Molten Key's sprite. 2020-06-30 15:44:34 -04:00
FyloZ
689c73d0bd Updated Slimer's sprite. 2020-06-30 15:43:41 -04:00
FyloZ
448c5f5ca5 Updated Lightning Sphere's sprite to the correct sprite. 2020-06-30 15:42:47 -04:00
FyloZ
8bc27709da Updated Lightning Sphere's sprite. 2020-06-30 15:41:35 -04:00
FyloZ
4f0ec9b01a Updated Lightning Sphere's sprite. 2020-06-30 15:40:13 -04:00
FyloZ
dec2f677ef Updated Titanic Gatli Stynger's sprite. 2020-06-30 15:38:04 -04:00
FyloZ
1341f6f2bd Updated Chain Stynger's sprite. 2020-06-30 15:35:49 -04:00
FyloZ
306ebea396 Updated Blood Stream's sprite. 2020-06-30 15:25:24 -04:00
FyloZ
dc5a91f713 Updated Bloodshot Eye Treasure Bag's sprite. 2020-06-30 15:22:54 -04:00
FyloZ
8724b50406 Updated Rod of Lightning's sprite. 2020-06-30 15:21:32 -04:00
FyloZ
86d1d4d944 Updated Bloodied Maw's sprite. 2020-06-30 15:18:50 -04:00
FyloZ
428d11a55d Updated Umbra's sprite. 2020-06-30 15:16:44 -04:00
FyloZ
6d6c996162 Updated Siphon Arrow's sprite. 2020-06-30 15:12:16 -04:00
FyloZ
9dd0986d18 Updated Necrosis Stone's sprite. 2020-06-30 15:08:49 -04:00
FyloZ
430163f6a1 Added Staff of Shifting Sands recipe and value.
Added Sundial's value.
2020-06-30 15:03:15 -04:00
FyloZ
175b91bdbb Added Staff of Shifting Sands recipe and value. 2020-06-30 14:53:13 -04:00
FyloZ
4f10fb0226 Added Sundial, Staff of Shifting Sands and Timekeeper to Dune Wyrm's expert drops. 2020-06-30 14:40:28 -04:00
FyloZ
e2e8537a01 Added the Timekeeper (WIP).
- The double helix pattern is broken at some rotation.
 - The bullet sometimes get killed for no reason.
2020-06-30 14:11:05 -04:00
FyloZ
340d245cbd Updated the Hour Hand 2020-06-23 14:28:18 -04:00
FyloZ
f67fdce869 Finished staff of shifting sands.
A lot of testing is needed because it's a NPC converted to a projectile and a bit hacky.
Known bugs:
    * Tail does not spawn
    * Minion slots are ignored
2020-06-23 01:11:46 -04:00
FyloZ
06fa4569a8 Started work on Staff of Shifting Sands 2020-06-12 19:28:38 -04:00
FyloZ
601b097dc2 Updated Sundial 2020-06-11 23:19:28 -04:00
FyloZ
2bb7ef3935 Added Sundial (WIP) 2020-06-11 19:44:56 -04:00
FyloZ
8c2c2e5aa0 Added Slimer
Added Green Slime
2020-06-11 11:06:29 -04:00
FyloZ
ac911768d8 Added Dune Wyrm's music
Added Bloodshot Eye's music
2020-06-10 21:20:58 -04:00
FyloZ
bba5549405 Added Veil of Vengeance 2020-06-10 21:10:37 -04:00
FyloZ
1925ce1a84 Updated Great Dune Wyrm's name 2020-06-10 19:38:09 -04:00
FyloZ
2520570fa6 Added Wasp Necklace 2020-06-10 19:35:55 -04:00
FyloZ
0510b2f3c9 Added Wasp Necklace 2020-06-10 19:34:39 -04:00
FyloZ
cd01d40d54 Update Grand Dune Wyrm name. 2020-06-10 15:59:03 -04:00
FyloZ
66ec20095d Added Wasp Nest. 2020-06-10 15:55:06 -04:00
FyloZ
1a01dde0cd Increased Bloodshot Eye's and Blood Stream's blood range.
Changed Wooden Slingshot damage type to ranged.
2020-06-06 16:01:48 -04:00
FyloZ
48bc9baacb Buffed Vampiric Shiv to now shoot a Tooth and to be a regular sword.
Fixed a typo in the Fire Amulet tooltip.
2020-06-06 15:20:01 -04:00
FyloZ
221689cd84 Buffed the Umbra 2020-06-06 15:07:42 -04:00
FyloZ
19e09fbedc Updated Necro casters so they cannot spawn while the Bloodshot Eye is present. 2020-06-06 14:52:58 -04:00
FyloZ
4e65dbdfbb Reverted the Hour Glass sprites to the original (the good one) 2020-06-06 14:41:25 -04:00
FyloZ
ab564d0d3c Updated Arachnus's music 2020-06-06 12:47:37 -04:00
FyloZ
80262bf100 Updated buffs sprites.
Updated fire amulet's synergy.
2020-06-06 12:00:15 -04:00
FyloZ
80adca9cf3 Fixed Arachnus not spawning. 2020-06-05 21:35:06 -04:00
FyloZ
c3fcc05859 Fixed Dune Wyrm dropping nothing 2020-06-05 21:34:00 -04:00
FyloZ
6d48fb7ef0 Updated Dune Wyrm map icon.
Updated Dune wyrn treasure bag sprite.
Updated debug sword.
2020-06-05 19:17:22 -04:00
FyloZ
8300ab0d36 Added Greater Antidote. 2020-06-05 18:59:37 -04:00
FyloZ
69b1610428 Added Greater Antidote.
Fixed typos.
2020-06-05 18:45:49 -04:00
FyloZ
8f448c6ca5 Updated Hyperthermic debuff sprite 2020-06-05 16:29:34 -04:00
FyloZ
a9b48d9faf Updated Enveloped buff sprite 2020-06-05 16:28:59 -04:00
FyloZ
15ee0e06d4 Added new Antidote's sprite 2020-06-05 16:27:44 -04:00
FyloZ
c88daca40b Added Red Hot Shackle's effect. 2020-06-05 16:23:31 -04:00
FyloZ
15d2947c33 Networking stuff for the Dune Wyrm.
Changed Crystal Skull and Red Hot Shackle's sprites
2020-06-05 16:06:36 -04:00
FyloZ
16b387b796 Added new Dune Wyrm and Ancient Tomb Crawler sprites.
Added debug tools.
2020-06-05 12:42:17 -04:00
FyloZ
9c23e3284f Fixed Bloodshot Eye disappearing.
The Bloody Lunar Tablet can now be used the day.
2020-06-04 17:17:01 -04:00
412 changed files with 7027 additions and 3242 deletions

2
.gitignore vendored
View File

@ -41,3 +41,5 @@
/bin
/Properties
*.csproj
/.idea

View File

@ -1,5 +1,5 @@
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ModLoader;
namespace Decimation.Content.Buffs.Buffs
{

View File

@ -1,6 +1,5 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Decimation.Lib.Buffs;
using Terraria;
namespace Decimation.Content.Buffs.Buffs
{

View File

@ -1,6 +1,5 @@
using Terraria;
using Terraria.ModLoader;
using Terraria.DataStructures;
using Decimation.Lib.Buffs;
using Terraria;
namespace Decimation.Content.Buffs.Buffs
{

View File

@ -1,4 +1,5 @@
using Terraria;
using Decimation.Lib.Buffs;
using Terraria;
namespace Decimation.Content.Buffs.Buffs
{

View File

@ -1,6 +1,5 @@
using Terraria;
using Terraria.ModLoader;
using Terraria.DataStructures;
using Decimation.Lib.Buffs;
using Terraria;
namespace Decimation.Content.Buffs.Buffs
{

View File

@ -1,4 +1,6 @@
using Decimation.Content.Projectiles;
using Decimation.Content.Projectiles.Item.Weapon;
using Decimation.Lib.Buffs;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;

View File

@ -1,4 +1,5 @@
using Microsoft.Xna.Framework.Input;
using Decimation.Lib.Buffs;
using Microsoft.Xna.Framework.Input;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

View File

@ -1,6 +1,5 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Decimation.Lib.Buffs;
using Terraria;
namespace Decimation.Content.Buffs.Buffs
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

After

Width:  |  Height:  |  Size: 474 B

View File

@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using Decimation.Lib.Buffs;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

View File

@ -1,5 +1,5 @@
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ModLoader;
namespace Decimation.Content.Buffs.Buffs
{

View File

@ -1,4 +1,5 @@
using Terraria;
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

View File

@ -1,4 +1,5 @@
using Terraria;
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ID;
namespace Decimation.Content.Buffs.Debuffs

View File

@ -1,6 +1,5 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Decimation.Lib.Buffs;
using Terraria;
namespace Decimation.Content.Buffs.Debuffs
{
@ -24,6 +23,7 @@ namespace Decimation.Content.Buffs.Debuffs
{
player.lifeRegen = 0;
}
player.lifeRegenTime = 0;
player.lifeRegen -= 3;
@ -36,6 +36,7 @@ namespace Decimation.Content.Buffs.Debuffs
{
npc.lifeRegen = 0;
}
npc.lifeRegenExpectedLossPerSecond += 3;
npc.lifeRegen -= 3;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 537 B

View File

@ -1,4 +1,5 @@
using Terraria;
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 575 B

View File

@ -1,4 +1,5 @@
using Terraria;
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

View File

@ -1,4 +1,5 @@
using Terraria;
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 393 B

View File

@ -1,6 +1,5 @@
using System;
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Content.Buffs.Debuffs
@ -8,7 +7,10 @@ namespace Decimation.Content.Buffs.Debuffs
internal class Hyperthermic : DecimationBuff
{
protected override string DisplayName => "Hyperthermic!";
protected override string Description => "Water, water everywhere but not a drop to drink... \nBlock mana potions use \nLowers defense by 10% \nLowers speed by 5%";
protected override string Description =>
"Water, water everywhere but not a drop to drink... \nBlock mana potions use \nLowers defense by 10% \nLowers speed by 5%";
public override bool Debuff => true;
protected override void Init()
@ -20,13 +22,13 @@ namespace Decimation.Content.Buffs.Debuffs
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;
}
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;
}
}
@ -35,7 +37,8 @@ namespace Decimation.Content.Buffs.Debuffs
{
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);
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 486 B

View File

@ -1,4 +1,5 @@
using Terraria;
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 B

After

Width:  |  Height:  |  Size: 471 B

View File

@ -1,4 +1,5 @@
using Terraria;
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 485 B

View File

@ -1,4 +1,5 @@
using Terraria;
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@ -40,7 +41,7 @@ namespace Decimation.Content.Buffs.Debuffs
{
return !(item.UseSound != null && item.useStyle == 2);
}
return true;
return base.CanUseItem(item, player);
}
}
}

View File

@ -1,3 +1,4 @@
using Decimation.Lib.Buffs;
using Terraria;
using Terraria.ModLoader;
using Terraria.DataStructures;
@ -41,7 +42,7 @@ namespace Decimation.Content.Buffs.Debuffs
{
return !(item.UseSound != null && item.useStyle == 2);
}
return true;
return base.CanUseItem(item, player);
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 577 B

36
Content/Debug/DebugAI.cs Normal file
View 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);
}
}
}

View 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);
}
}
}

View 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;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 B

View File

@ -1,22 +1,23 @@
using System;
using System.Collections.Generic;
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.ID;
using Terraria.Localization;
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 Microsoft.Xna.Framework;
namespace Decimation.Content
{
public class Decimation : Mod
{
public static Decimation Instance { set; get; }
public static AmuletSlotState amuletSlotState;
private UserInterface amuletSlotInterface;
@ -26,7 +27,7 @@ namespace Decimation.Content
{
Instance = this;
Properties = new ModProperties()
Properties = new ModProperties
{
Autoload = true,
AutoloadGores = true,
@ -36,6 +37,8 @@ namespace Decimation.Content
References.mod = this;
}
public static Decimation Instance { set; get; }
public override void Load()
{
if (!Main.dedServ)
@ -93,74 +96,79 @@ namespace Decimation.Content
Mod bossChecklist = ModLoader.GetMod("BossChecklist");
if (bossChecklist != null)
{
bossChecklist.Call("AddBossWithInfo", "The Bloodshot Eye", 2.5f, (Func<bool>)(() => DecimationWorld.downedBloodshotEye), "INSERT LATER");
bossChecklist.Call("AddBossWithInfo", "The Ancient Dune Worm", 5.7f, (Func<bool>)(() => DecimationWorld.downedDuneWorm), "INSERT LATER");
bossChecklist.Call("AddBossWithInfo", "Arachnus", 20f, (Func<bool>)(() => DecimationWorld.downedArachnus), "INSERT LATER");
bossChecklist.Call("AddBossWithInfo", "The Bloodshot Eye", 2.5f,
(Func<bool>) (() => DecimationWorld.downedBloodshotEye), "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()
{
RecipeGroup gems = new RecipeGroup(() => Lang.misc[37] + " Gem", new int[]
{
RecipeGroup gems = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " Gem",
ItemID.Amethyst,
ItemID.Topaz,
ItemID.Emerald,
ItemID.Sapphire,
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.GreenThread,
ItemID.PinkThread
});
ItemID.PinkThread);
RecipeGroup.RegisterGroup(DecimationRecipeGroupID.AnyThread, threads);
RecipeGroup.RegisterGroup("AnyGem", gems);
RecipeGroup.RegisterGroup("AnyThread", threads);
RecipeGroup corruptedWoodAxes = new RecipeGroup(
() => 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)
{
DecimationModMessageType msgType = (DecimationModMessageType)reader.ReadByte();
DecimationModMessageType msgType = (DecimationModMessageType) reader.ReadByte();
switch (msgType)
{
case DecimationModMessageType.Arachnus:
Arachnus arachnus = (Arachnus)Main.npc[reader.ReadInt32()].modNPC;
if (arachnus != null && arachnus.npc.active)
{
arachnus.HandlePacket(reader);
}
Arachnus arachnus = (Arachnus) Main.npc[reader.ReadInt32()].modNPC;
if (arachnus != null && arachnus.npc.active) arachnus.HandlePacket(reader);
break;
case DecimationModMessageType.DuneWorm:
AncientDuneWormHead duneWorm = (AncientDuneWormHead)Main.npc[reader.ReadInt32()].modNPC;
if (duneWorm != null && duneWorm.npc.active)
{
// TODO multiplayer
//duneWorm.HandlePacket(reader);
}
case DecimationModMessageType.DuneWyrm:
DuneWyrmHead duneWyrm = (DuneWyrmHead) Main.npc[reader.ReadInt32()].modNPC;
if (duneWyrm != null && duneWyrm.npc.active) duneWyrm.HandlePacket(reader);
break;
case DecimationModMessageType.AncientTombCrawler:
AncientTombCrawler tombCrawler = (AncientTombCrawler) Main.npc[reader.ReadInt32()].modNPC;
if (tombCrawler != null && tombCrawler.npc.active) tombCrawler.HandlePacket(reader);
break;
case DecimationModMessageType.SpawnBoss:
int type = reader.ReadInt32();
int player = reader.ReadInt32();
Main.PlaySound(15, (int)Main.player[player].position.X, (int)Main.player[player].position.Y, 0);
Main.PlaySound(15, (int) Main.player[player].position.X, (int) Main.player[player].position.Y, 0);
if (Main.netMode != 1)
NPC.SpawnOnPlayer(player, type);
break;
default:
ErrorLogger.Log("DecimationMod: Unknown Message type: " + msgType);
break;
}
}
}
enum DecimationModMessageType : byte
internal enum DecimationModMessageType : byte
{
Arachnus,
DuneWorm,
DuneWyrm,
AncientTombCrawler,
SpawnBoss
}
}

View File

@ -1,11 +1,12 @@
using System;
using System.Collections.Generic;
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.Collections;
using Decimation.Lib.Util;
using Decimation.Content.Items.Amulets;
using Decimation.Content.Items.Misc;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Shaders;
@ -15,7 +16,7 @@ using Terraria.ModLoader.IO;
namespace Decimation.Content
{
public class DecimationPlayer : DecimationModPlayer
public class DecimationPlayer : ModPlayer
{
// Amulet slot
private Amulet _amuletSlotAmulet;
@ -42,7 +43,6 @@ namespace Decimation.Content
// Effects
public bool hasCursedAccessory;
public byte hyperStars;
public byte soulFruits;
public bool isInCombat;
public bool jestersQuiverEquiped;
@ -58,6 +58,7 @@ namespace Decimation.Content
// Scarab shield
public int solarCounter = 0;
public byte soulFruits;
public bool tideTurnerEquipped;
public int ttDash;
public int ttHit;
@ -67,8 +68,8 @@ namespace Decimation.Content
// Slimy Feet buff
public bool wasJumping = false;
public override bool HasShield { get; set; }
public override bool HasLavaCharm { get; set; }
public ICollection<int> EquippedAccessories { get; } = new List<int>();
public bool NextHitCrit { get; set; }
public Item AmuletSlotItem
{
@ -82,12 +83,14 @@ namespace Decimation.Content
public override void Initialize()
{
this.AmuletSlotItem = new Item();
this.AmuletSlotItem.SetDefaults(0, true);
AmuletSlotItem = new Item();
AmuletSlotItem.SetDefaults(0, true);
}
public override void ResetEffects()
{
EquippedAccessories.Clear();
closeToEnchantedAnvil = false;
jestersQuiverEquiped = false;
deadeyesQuiverEquipped = false;
@ -97,13 +100,10 @@ namespace Decimation.Content
tideTurnerEquipped = false;
vampire = false;
this.HasLavaCharm = false;
this.HasShield = false;
hasCursedAccessory = false;
this.player.statManaMax2 += hyperStars * HyperStar.ManaHealAmount;
this.player.statLifeMax2 += soulFruits * SoulFruit.LifeHealAmount;
player.statManaMax2 += hyperStars * HyperStar.ManaHealAmount;
player.statLifeMax2 += soulFruits * SoulFruit.LifeHealAmount;
if (combatTime > 360)
{
@ -117,8 +117,8 @@ namespace Decimation.Content
amuletsBuffTime = 0;
amuletsBuffWhenAttacking = false;
if (!this.player.HasBuff(ModContent.BuffType<SlimyFeet>())) lastJumpBoost = 0;
if (!this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()))
if (!player.HasBuff(ModContent.BuffType<SlimyFeet>())) lastJumpBoost = 0;
if (!player.HasBuff(ModContent.BuffType<ScarabEndurance>()))
{
scarabEnduranceBuffTimeCounter = 0;
scarabCounter = 0;
@ -137,17 +137,17 @@ namespace Decimation.Content
return new TagCompound
{
{"amuletSlotItem", ItemIO.Save(this.AmuletSlotItem)},
{"hyperStars", this.hyperStars},
{"amuletSlotItem", ItemIO.Save(AmuletSlotItem)},
{"hyperStars", hyperStars},
{"soulFruits", soulFruits}
};
}
public override void Load(TagCompound tag)
{
this.AmuletSlotItem = ItemIO.Load(tag.GetCompound("amuletSlotItem"));
this.hyperStars = tag.GetByte("hyperStars");
this.soulFruits = tag.GetByte("soulFruits");
AmuletSlotItem = ItemIO.Load(tag.GetCompound("amuletSlotItem"));
hyperStars = tag.GetByte("hyperStars");
soulFruits = tag.GetByte("soulFruits");
}
// FIND AN ALTERNATIVE! THIS METHOD DOESN'T GET CALLED WITH EVERY WEAPONS
@ -177,7 +177,7 @@ namespace Decimation.Content
}
// Frost Amulet
if (this.AmuletSlotItem.type == ModContent.ItemType<FrostAmulet>() && toCheck.arrow)
if (AmuletSlotItem.type == ModContent.ItemType<FrostAmulet>() && toCheck.arrow)
{
speedX *= 1.03f;
speedY *= 1.03f;
@ -196,10 +196,10 @@ namespace Decimation.Content
return false;
if (endlessPouchofLifeEquipped && ammo.ammo == AmmoID.Bullet)
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))
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)
return false;
@ -225,15 +225,15 @@ namespace Decimation.Content
{
if (vampire)
{
this.player.head = 124;
this.player.body = 85;
this.player.legs = 72;
player.head = 124;
player.body = 85;
player.legs = 72;
}
}
public override void PostUpdate()
{
oldStatDefense = this.player.statDefense;
oldStatDefense = player.statDefense;
if (lastHitCounter >= 60)
{
@ -257,15 +257,17 @@ namespace Decimation.Content
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 &&
this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>())
AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>())
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
target.AddBuff(amuletsBuff, amuletsBuffTime);
if (this.AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>())
if (AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>())
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)
@ -274,16 +276,18 @@ namespace Decimation.Content
combatTime = 0;
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)
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)
{
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
(this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
this.AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
(AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
target.AddBuff(amuletsBuff, amuletsBuffTime);
}
@ -294,15 +298,15 @@ namespace Decimation.Content
combatTime = 0;
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
(this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
this.AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
(AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
target.AddBuff(amuletsBuff, amuletsBuffTime);
}
public override void OnHitByNPC(NPC npc, int damage, bool crit)
{
if (this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
if (player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
lastHitCounter == 0 &&
!wasHurt)
{
@ -317,7 +321,7 @@ namespace Decimation.Content
if (graniteLinedTunicEquipped)
{
this.player.statLife += (int) (damage * 0.04f);
player.statLife += (int) (damage * 0.04f);
if (Main.rand.Next(3, 100) < 3)
npc.AddBuff(BuffID.Confused, 600);
@ -325,26 +329,32 @@ namespace Decimation.Content
if (tideTurnerEquipped && Main.rand.NextBool(2))
{
Main.NewText("Tide Turner");
this.player.statLife += damage;
player.statLife += damage;
}
foreach (Player otherPlayer in Main.player)
if (otherPlayer.whoAmI != this.player.whoAmI)
if (otherPlayer.whoAmI != player.whoAmI)
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;
}
if (this.AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
if (AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
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)
{
if (this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
if (player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
lastHitCounter == 0 &&
!wasHurt)
{
@ -363,7 +373,7 @@ namespace Decimation.Content
if (graniteLinedTunicEquipped)
{
this.player.statLife += (int) (damage * 0.04f);
player.statLife += (int) (damage * 0.04f);
if (proj.npcProj && Main.rand.Next(3, 100) < 3)
Main.npc[proj.owner].AddBuff(BuffID.Confused, 600);
@ -372,26 +382,99 @@ namespace Decimation.Content
}
foreach (Player otherPlayer in Main.player)
if (otherPlayer.whoAmI != this.player.whoAmI)
if (otherPlayer.whoAmI != player.whoAmI)
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;
}
if (this.AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
if (AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
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)
{
_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)
{
_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()
@ -401,80 +484,80 @@ namespace Decimation.Content
if (ttHit < 0)
{
Rectangle rectangle =
new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0),
(int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8,
this.player.height + 8);
new Rectangle((int) (player.position.X + player.velocity.X * 0.5 - 4.0),
(int) (player.position.Y + player.velocity.Y * 0.5 - 4.0), player.width + 8,
player.height + 8);
for (int i = 0; i < 200; i++)
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly)
{
NPC nPC = Main.npc[i];
Rectangle rect = nPC.getRect();
if (rectangle.Intersects(rect) && (nPC.noTileCollide || this.player.CanHit(nPC)))
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
{
float num = dashDamages * this.player.meleeDamage;
float num = dashDamages * player.meleeDamage;
float num2 = 9f;
bool crit = false;
if (this.player.kbGlove) num2 *= 2f;
if (this.player.kbBuff) num2 *= 1.5f;
if (Main.rand.Next(100) < this.player.meleeCrit) crit = true;
int num3 = this.player.direction;
if (this.player.velocity.X < 0f) num3 = -1;
if (this.player.velocity.X > 0f) num3 = 1;
if (this.player.whoAmI == Main.myPlayer)
this.player.ApplyDamageToNPC(nPC, (int) num, num2, num3, crit);
if (player.kbGlove) num2 *= 2f;
if (player.kbBuff) num2 *= 1.5f;
if (Main.rand.Next(100) < player.meleeCrit) crit = true;
int num3 = player.direction;
if (player.velocity.X < 0f) num3 = -1;
if (player.velocity.X > 0f) num3 = 1;
if (player.whoAmI == Main.myPlayer)
player.ApplyDamageToNPC(nPC, (int) num, num2, num3, crit);
ttDash = 10;
dashDelay = 30;
this.player.velocity.X = (0f - num3) * 9f;
this.player.velocity.Y = -4f;
this.player.immune = true;
this.player.immuneNoBlink = true;
this.player.immuneTime = 4;
player.velocity.X = (0f - num3) * 9f;
player.velocity.Y = -4f;
player.immune = true;
player.immuneNoBlink = true;
player.immuneTime = 4;
ttHit = i;
}
}
}
else if ((!this.player.controlLeft || this.player.velocity.X >= 0f) &&
(!this.player.controlRight || this.player.velocity.X <= 0f))
else if ((!player.controlLeft || 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 =
new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0),
(int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8,
this.player.height + 8);
new Rectangle((int) (player.position.X + player.velocity.X * 0.5 - 4.0),
(int) (player.position.Y + player.velocity.Y * 0.5 - 4.0), player.width + 8,
player.height + 8);
for (int j = 0; j < 200; j++)
if (Main.npc[j].active && !Main.npc[j].dontTakeDamage && !Main.npc[j].friendly &&
Main.npc[j].immune[this.player.whoAmI] <= 0)
Main.npc[j].immune[player.whoAmI] <= 0)
{
NPC nPC2 = Main.npc[j];
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;
bool crit2 = false;
if (this.player.kbGlove) num5 *= 2f;
if (this.player.kbBuff) num5 *= 1.5f;
if (Main.rand.Next(100) < this.player.meleeCrit) crit2 = true;
int direction = this.player.direction;
if (this.player.velocity.X < 0f) direction = -1;
if (this.player.velocity.X > 0f) direction = 1;
if (this.player.whoAmI == Main.myPlayer)
if (player.kbGlove) num5 *= 2f;
if (player.kbBuff) num5 *= 1.5f;
if (Main.rand.Next(100) < player.meleeCrit) crit2 = true;
int direction = player.direction;
if (player.velocity.X < 0f) direction = -1;
if (player.velocity.X > 0f) direction = 1;
if (player.whoAmI == Main.myPlayer)
{
this.player.ApplyDamageToNPC(nPC2, (int) num4, num5, direction, crit2);
int num6 = Projectile.NewProjectile(this.player.Center.X, this.player.Center.Y, 0f, 0f,
player.ApplyDamageToNPC(nPC2, (int) num4, num5, direction, crit2);
int num6 = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f,
608, 150, 15f, Main.myPlayer);
Main.projectile[num6].Kill();
}
nPC2.immune[this.player.whoAmI] = 6;
this.player.immune = true;
this.player.immuneNoBlink = true;
this.player.immuneTime = 4;
nPC2.immune[player.whoAmI] = 6;
player.immune = true;
player.immuneNoBlink = true;
player.immuneTime = 4;
}
}
}
@ -489,43 +572,43 @@ namespace Decimation.Content
{
float num7 = 12f;
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;
int num11 = 20;
if (dash == 1)
{
for (int k = 0; k < 2; k++)
{
int num12 = this.player.velocity.Y != 0f
int num12 = player.velocity.Y != 0f
? Dust.NewDust(
new Vector2(this.player.position.X,
this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31,
new Vector2(player.position.X,
player.position.Y + player.height / 2 - 8f), player.width, 16, 31,
0f, 0f, 100, default, 1.4f)
: Dust.NewDust(
new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f),
this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
new Vector2(player.position.X, player.position.Y + player.height - 4f),
player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
Dust obj = Main.dust[num12];
obj.velocity *= 0.1f;
Main.dust[num12].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
}
}
else if (dash == 2)
{
for (int l = 0; l < 0; l++)
{
int num13 = this.player.velocity.Y != 0f
int num13 = player.velocity.Y != 0f
? Dust.NewDust(
new Vector2(this.player.position.X,
this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31,
new Vector2(player.position.X,
player.position.Y + player.height / 2 - 8f), player.width, 16, 31,
0f, 0f, 100, default, 1.4f)
: Dust.NewDust(
new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f),
this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
new Vector2(player.position.X, player.position.Y + player.height - 4f),
player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
Dust obj2 = Main.dust[num13];
obj2.velocity *= 0.1f;
Main.dust[num13].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num13].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
Main.dust[num13].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
}
num8 = 0.985f;
@ -536,13 +619,13 @@ namespace Decimation.Content
{
for (int m = 0; m < 4; m++)
{
int num14 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f),
this.player.width, this.player.height - 8, 6, 0f, 0f, 100, default, 1.7f);
int num14 = Dust.NewDust(new Vector2(player.position.X, player.position.Y + 4f),
player.width, player.height - 8, 6, 0f, 0f, 100, default, 1.7f);
Dust obj3 = Main.dust[num14];
obj3.velocity *= 0.1f;
Main.dust[num14].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num14].shader =
GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player);
GameShaders.Armor.GetSecondaryShader(player.ArmorSetDye(), player);
Main.dust[num14].noGravity = true;
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++)
{
int num15 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f),
this.player.width, this.player.height - 8, 229, 0f, 0f, 100, default, 1.2f);
int num15 = Dust.NewDust(new Vector2(player.position.X, player.position.Y + 4f),
player.width, player.height - 8, 229, 0f, 0f, 100, default, 1.2f);
Dust obj4 = Main.dust[num15];
obj4.velocity *= 0.1f;
Main.dust[num15].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num15].shader = GameShaders.Armor.GetSecondaryShader(this.player.cWings, this.player);
Main.dust[num15].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player);
Main.dust[num15].noGravity = true;
if (Main.rand.Next(2) == 0) Main.dust[num15].fadeIn = 0.3f;
}
@ -573,25 +656,25 @@ namespace Decimation.Content
if (dash > 0)
{
this.player.vortexStealthActive = false;
if (this.player.velocity.X > num7 || this.player.velocity.X < 0f - num7)
player.vortexStealthActive = false;
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
{
dashDelay = num11;
if (this.player.velocity.X < 0f)
this.player.velocity.X = 0f - num9;
else if (this.player.velocity.X > 0f) this.player.velocity.X = num9;
if (player.velocity.X < 0f)
player.velocity.X = 0f - 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)
{
@ -599,7 +682,7 @@ namespace Decimation.Content
bool flag = false;
if (dashTime > 0) dashTime--;
if (dashTime < 0) dashTime++;
if (this.player.controlRight && this.player.releaseRight)
if (player.controlRight && player.releaseRight)
{
if (dashTime > 0)
{
@ -612,7 +695,7 @@ namespace Decimation.Content
dashTime = 15;
}
}
else if (this.player.controlLeft && this.player.releaseLeft)
else if (player.controlLeft && player.releaseLeft)
{
if (dashTime < 0)
{
@ -628,20 +711,20 @@ namespace Decimation.Content
if (flag)
{
this.player.velocity.X = 16.9f * num16;
Point point = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2,
this.player.gravDir * (0f - this.player.height) / 2f +
this.player.gravDir * 2f)).ToTileCoordinates();
Point point2 = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2, 0f))
player.velocity.X = 16.9f * num16;
Point point = (player.Center + new Vector2(num16 * player.width / 2 + 2,
player.gravDir * (0f - player.height) / 2f +
player.gravDir * 2f)).ToTileCoordinates();
Point point2 = (player.Center + new Vector2(num16 * player.width / 2 + 2, 0f))
.ToTileCoordinates();
if (WorldGen.SolidOrSlopedTile(point.X, point.Y) ||
WorldGen.SolidOrSlopedTile(point2.X, point2.Y))
this.player.velocity.X = this.player.velocity.X / 2f;
player.velocity.X = player.velocity.X / 2f;
dashDelay = -1;
for (int num17 = 0; num17 < 20; num17++)
{
int num18 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f);
int num18 = Dust.NewDust(new Vector2(player.position.X, player.position.Y),
player.width, player.height, 31, 0f, 0f, 100, default, 2f);
Dust dust = Main.dust[num18];
dust.position.X = dust.position.X + Main.rand.Next(-5, 6);
Dust dust2 = Main.dust[num18];
@ -650,20 +733,20 @@ namespace Decimation.Content
obj5.velocity *= 0.2f;
Main.dust[num18].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num18].shader =
GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
}
int num19 = Gore.NewGore(
new Vector2(this.player.position.X + this.player.width / 2 - 24f,
this.player.position.Y + this.player.height / 2 - 34f), default,
new Vector2(player.position.X + player.width / 2 - 24f,
player.position.Y + player.height / 2 - 34f), default,
Main.rand.Next(61, 64));
Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f;
Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f;
Gore obj6 = Main.gore[num19];
obj6.velocity *= 0.4f;
num19 = Gore.NewGore(
new Vector2(this.player.position.X + this.player.width / 2 - 24f,
this.player.position.Y + this.player.height / 2 - 14f), default,
new Vector2(player.position.X + player.width / 2 - 24f,
player.position.Y + player.height / 2 - 14f), default,
Main.rand.Next(61, 64));
Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f;
Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f;
@ -677,7 +760,7 @@ namespace Decimation.Content
bool flag2 = false;
if (dashTime > 0) dashTime--;
if (dashTime < 0) dashTime++;
if (this.player.controlRight && this.player.releaseRight)
if (player.controlRight && player.releaseRight)
{
if (dashTime > 0)
{
@ -690,7 +773,7 @@ namespace Decimation.Content
dashTime = 15;
}
}
else if (this.player.controlLeft && this.player.releaseLeft)
else if (player.controlLeft && player.releaseLeft)
{
if (dashTime < 0)
{
@ -706,21 +789,21 @@ namespace Decimation.Content
if (flag2)
{
this.player.velocity.X = 14.5f * num20;
Point point3 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2,
this.player.gravDir * (0f - this.player.height) / 2f +
this.player.gravDir * 2f)).ToTileCoordinates();
Point point4 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2, 0f))
player.velocity.X = 14.5f * num20;
Point point3 = (player.Center + new Vector2(num20 * player.width / 2 + 2,
player.gravDir * (0f - player.height) / 2f +
player.gravDir * 2f)).ToTileCoordinates();
Point point4 = (player.Center + new Vector2(num20 * player.width / 2 + 2, 0f))
.ToTileCoordinates();
if (WorldGen.SolidOrSlopedTile(point3.X, point3.Y) ||
WorldGen.SolidOrSlopedTile(point4.X, point4.Y))
this.player.velocity.X = this.player.velocity.X / 2f;
player.velocity.X = player.velocity.X / 2f;
dashDelay = -1;
ttDash = 15;
for (int num21 = 0; num21 < 0; num21++)
{
int num22 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f);
int num22 = Dust.NewDust(new Vector2(player.position.X, player.position.Y),
player.width, player.height, 31, 0f, 0f, 100, default, 2f);
Dust dust3 = Main.dust[num22];
dust3.position.X = dust3.position.X + Main.rand.Next(-5, 6);
Dust dust4 = Main.dust[num22];
@ -729,7 +812,7 @@ namespace Decimation.Content
obj8.velocity *= 0.2f;
Main.dust[num22].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num22].shader =
GameShaders.Armor.GetSecondaryShader(this.player.cShield, this.player);
GameShaders.Armor.GetSecondaryShader(player.cShield, player);
}
}
}
@ -739,7 +822,7 @@ namespace Decimation.Content
bool flag3 = false;
if (dashTime > 0) dashTime--;
if (dashTime < 0) dashTime++;
if (this.player.controlRight && this.player.releaseRight)
if (player.controlRight && player.releaseRight)
{
if (dashTime > 0)
{
@ -752,7 +835,7 @@ namespace Decimation.Content
dashTime = 15;
}
}
else if (this.player.controlLeft && this.player.releaseLeft)
else if (player.controlLeft && player.releaseLeft)
{
if (dashTime < 0)
{
@ -768,20 +851,20 @@ namespace Decimation.Content
if (flag3)
{
this.player.velocity.X = 21.9f * num23;
Point point5 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2,
this.player.gravDir * (0f - this.player.height) / 2f +
this.player.gravDir * 2f)).ToTileCoordinates();
Point point6 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2, 0f))
player.velocity.X = 21.9f * num23;
Point point5 = (player.Center + new Vector2(num23 * player.width / 2 + 2,
player.gravDir * (0f - player.height) / 2f +
player.gravDir * 2f)).ToTileCoordinates();
Point point6 = (player.Center + new Vector2(num23 * player.width / 2 + 2, 0f))
.ToTileCoordinates();
if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) ||
WorldGen.SolidOrSlopedTile(point6.X, point6.Y))
this.player.velocity.X = this.player.velocity.X / 2f;
player.velocity.X = player.velocity.X / 2f;
dashDelay = -1;
for (int num24 = 0; num24 < 20; num24++)
{
int num25 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
this.player.width, this.player.height, 6, 0f, 0f, 100, default, 2f);
int num25 = Dust.NewDust(new Vector2(player.position.X, player.position.Y),
player.width, player.height, 6, 0f, 0f, 100, default, 2f);
Dust dust5 = Main.dust[num25];
dust5.position.X = dust5.position.X + Main.rand.Next(-5, 6);
Dust dust6 = Main.dust[num25];
@ -790,7 +873,7 @@ namespace Decimation.Content
obj9.velocity *= 0.2f;
Main.dust[num25].scale *= 1f + Main.rand.Next(20) * 0.01f;
Main.dust[num25].shader =
GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player);
GameShaders.Armor.GetSecondaryShader(player.ArmorSetDye(), player);
Main.dust[num25].noGravity = true;
Main.dust[num25].fadeIn = 0.5f;
}
@ -811,22 +894,11 @@ namespace Decimation.Content
float speedX = (float) Math.Cos(currentAngle) * speed;
float speedY = (float) Math.Sin(currentAngle) * speed;
Projectile.NewProjectile(this.player.Center, new Vector2(speedX, speedY), ProjectileID.CrystalShard, 20,
5, this.player.whoAmI);
Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileID.CrystalShard, 20,
5, player.whoAmI);
currentAngle += angleDifference;
}
}
}
public class PlayerPropertiesUpdater : GlobalItem
{
public override void UpdateAccessory(Item item, Player player, bool hideVisual)
{
DecimationPlayer modPlayer = player.GetModPlayer<DecimationPlayer>();
if (item.type == ItemID.CobaltShield || item.type == ItemID.AnkhShield ||
item.type == ItemID.PaladinsShield || item.type == ItemID.ObsidianShield) modPlayer.HasShield = true;
if (item.type == ItemID.LavaCharm) modPlayer.HasLavaCharm = true;
}
}
}

View 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";
}
}

View File

@ -1,28 +1,26 @@
using System.IO;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
using Terraria.World.Generation;
using Terraria.GameContent.Generation;
using Terraria.ModLoader.IO;
using System.IO;
using Decimation.Content.Projectiles.Boss.DuneWyrm;
using Decimation.Content.Structures;
using Microsoft.Xna.Framework;
using System;
using Terraria.ID;
using Terraria;
using Terraria.GameContent.Generation;
using Terraria.ModLoader;
using Terraria.ModLoader.IO;
using Terraria.World.Generation;
namespace Decimation.Content
{
public class DecimationWorld : ModWorld
{
public static bool downedBloodshotEye;
public static bool downedDuneWorm;
public static bool downedDuneWyrm;
public static bool downedArachnus;
public static bool downedWyvern;
public override void Initialize()
{
downedBloodshotEye = false;
downedDuneWorm = false;
downedDuneWyrm = false;
downedArachnus = false;
downedWyvern = false;
}
@ -31,7 +29,7 @@ namespace Decimation.Content
{
var downed = new List<string>();
if (downedBloodshotEye) downed.Add("downedBloodshotEye");
if (downedDuneWorm) downed.Add("downedDuneWorm");
if (downedDuneWyrm) downed.Add("downedDuneWyrm");
if (downedArachnus) downed.Add("downedArachnus");
if (downedWyvern) downed.Add("downedWyvern");
return new TagCompound {
@ -42,15 +40,17 @@ namespace Decimation.Content
{
var downed = tag.GetList<string>("downed");
downedBloodshotEye = downed.Contains("downedBloodshotEye");
downedDuneWorm = downed.Contains("downedDuneWorm");
downedDuneWyrm = downed.Contains("downedDuneWyrm");
downedArachnus = downed.Contains("downedArachnus");
downedWyvern = downed.Contains("downedWyvern");
Sundial.Reset();
}
public override void NetSend(BinaryWriter writer)
{
BitsByte flags = new BitsByte();
flags[0] = downedBloodshotEye; //+1 flag number for each new boss
flags[1] = downedDuneWorm;
flags[1] = downedDuneWyrm;
flags[2] = downedArachnus;
flags[3] = downedWyvern;
writer.Write(flags);
@ -59,7 +59,7 @@ namespace Decimation.Content
{
BitsByte flags = reader.ReadByte();
downedBloodshotEye = flags[0];
downedDuneWorm = flags[1];
downedDuneWyrm = flags[1];
downedArachnus = flags[2];
downedWyvern = flags[3];
}
@ -69,19 +69,19 @@ namespace Decimation.Content
if (loadVersion == 1)
{
byte flags = reader.ReadByte();
DecimationWorld.downedBloodshotEye = ((flags & 1) != 0);
DecimationWorld.downedDuneWorm = ((flags & 2) != 0); //double flag numbers with each new boss
DecimationWorld.downedArachnus = ((flags & 4) != 0);
DecimationWorld.downedWyvern = ((flags & 8) != 0);
downedBloodshotEye = ((flags & 1) != 0);
downedDuneWyrm = ((flags & 2) != 0); //double flag numbers with each new boss
downedArachnus = ((flags & 4) != 0);
downedWyvern = ((flags & 8) != 0);
}
else if (loadVersion == 2)
{
byte flags = reader.ReadByte();
byte flags2 = reader.ReadByte();
DecimationWorld.downedBloodshotEye = ((flags & 1) != 0);
DecimationWorld.downedDuneWorm = ((flags & 2) != 0);
DecimationWorld.downedArachnus = ((flags & 4) != 0);
DecimationWorld.downedWyvern = ((flags & 8) != 0);
downedBloodshotEye = ((flags & 1) != 0);
downedDuneWyrm = ((flags & 2) != 0);
downedArachnus = ((flags & 4) != 0);
downedWyvern = ((flags & 8) != 0);
}
}

View File

@ -23,7 +23,7 @@ namespace Decimation.Content.Items.Accessories
item.width = 46;
item.height = 62;
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)
@ -42,7 +42,7 @@ namespace Decimation.Content.Items.Accessories
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>()});

View File

@ -26,7 +26,7 @@ namespace Decimation.Content.Items.Accessories
item.height = 62;
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)
@ -59,7 +59,7 @@ namespace Decimation.Content.Items.Accessories
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>()});

View File

@ -15,14 +15,14 @@ namespace Decimation.Content.Items.Accessories
protected override void InitAccessory()
{
item.width = 24;
item.height = 24;
item.width = 35;
item.height = 22;
item.rare = Rarity.Green.GetRarityValue();
this.item.value = Item.buyPrice(0, 0, 0, 10);
this.item.defense = 2;
item.value = Item.sellPrice(0, 0, 0, 10);
item.defense = 2;
}
protected override List<ModRecipe> GetAdditionalRecipes()
protected override List<ModRecipe> GetRecipes()
{
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);
Lighting.AddLight(player.Center, new Vector3(0.9f * 0.6f, 0.9f * 0.1f, 0.9f));
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 549 B

View File

@ -22,10 +22,10 @@ namespace Decimation.Content.Items.Accessories
item.width = 30;
item.height = 30;
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>()});
recipe.AddIngredient(ModContent.ItemType<JestersQuiver>());

View File

@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
item.width = 46;
item.height = 62;
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)

View File

@ -17,10 +17,10 @@ namespace Decimation.Content.Items.Accessories
item.width = 62;
item.height = 46;
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);

View File

@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
item.width = 24;
item.height = 32;
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)
@ -33,7 +33,7 @@ namespace Decimation.Content.Items.Accessories
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>()});

View File

@ -17,10 +17,10 @@ namespace Decimation.Content.Items.Accessories
item.width = 62;
item.height = 46;
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);

View File

@ -17,10 +17,10 @@ namespace Decimation.Content.Items.Accessories
item.width = 54;
item.height = 46;
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);

View File

@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
player.statDefense += 2;
}
protected override List<ModRecipe> GetAdditionalRecipes()
protected override List<ModRecipe> GetRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils});

View File

@ -26,7 +26,7 @@ namespace Decimation.Content.Items.Accessories
player.rangedCrit += 5;
}
protected override List<ModRecipe> GetAdditionalRecipes()
protected override List<ModRecipe> GetRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});

View File

@ -27,7 +27,7 @@ namespace Decimation.Content.Items.Accessories
player.thrownCrit += 3;
}
protected override List<ModRecipe> GetAdditionalRecipes()
protected override List<ModRecipe> GetRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.Loom }, false);

View File

@ -13,11 +13,11 @@ namespace Decimation.Content.Items.Accessories
protected override void InitAccessory()
{
item.width = 20;
item.height = 20;
item.width = 32;
item.height = 32;
item.rare = Rarity.Rainbow.GetRarityValue();
this.item.value = Item.buyPrice(0, 5);
this.item.expert = true;
item.value = Item.sellPrice(gold: 5);
item.expert = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 471 B

View File

@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
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);

View File

@ -19,10 +19,10 @@ namespace Decimation.Content.Items.Accessories
item.width = 32;
item.height = 32;
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);

View File

@ -1,36 +1,49 @@
using System;
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.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using Decimation.Lib.Items;
using Decimation.Lib.Util;
namespace Decimation.Content.Items.Accessories
{
internal class RedHotShackle : DecimationAccessory
{
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()
{
item.width = 24;
item.height = 24;
item.rare = Rarity.Green.GetRarityValue();
item.value = Item.buyPrice(0, 0, 2);
item.value = Item.sellPrice(0, 0, 2);
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.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);
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 381 B

View File

@ -14,7 +14,7 @@ namespace Decimation.Content.Items.Accessories
item.width = 30;
item.height = 28;
item.rare = Rarity.Rainbow.GetRarityValue();
this.item.value = Item.buyPrice(0, 45);
this.item.value = Item.sellPrice(0, 45);
this.item.expert = true;
}

View File

@ -18,10 +18,10 @@ namespace Decimation.Content.Items.Accessories
item.height = 24;
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);

View File

@ -23,7 +23,7 @@ namespace Decimation.Content.Items.Accessories
item.width = 46;
item.height = 36;
item.rare = Rarity.Rainbow.GetRarityValue();
item.value = Item.buyPrice(0, 3);
item.value = Item.sellPrice(0, 3);
item.defense = 3;
item.shieldSlot = 5;
item.expert = true;
@ -40,7 +40,7 @@ namespace Decimation.Content.Items.Accessories
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);

View 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();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

View 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;
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

View 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;
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

View 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);
}
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

View 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);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

View 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();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

View 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;
}
}
}
}
}

View 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);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

View 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);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

View 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);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using Decimation.Content.Items.Misc.CondensedSouls;
using Decimation.Content.Items.Misc.ConcentratedSouls;
using Decimation.Content.Items.Ores;
using Decimation.Content.Projectiles;
using Decimation.Content.Projectiles.Item.Accessory;
using Decimation.Content.Tiles;
using Decimation.Lib.Items;
using Decimation.Lib.Util;
@ -24,16 +24,16 @@ namespace Decimation.Content.Items.Accessories.Wings
item.height = 26;
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)
{
player.wingTimeMax = 240;
Lighting.AddLight((int)(player.position.X + player.width / 2f) / 16,
(int)(player.position.Y + player.height / 2f) / 16, 1.05f, 0.95f, 0.55f);
Lighting.AddLight((int) (player.position.X + player.width / 2f) / 16,
(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,
player.whoAmI);
}
@ -54,16 +54,16 @@ namespace Decimation.Content.Items.Accessories.Wings
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.WingsSolar);
recipe.AddIngredient(ModContent.ItemType<CondensedSpite>(), 2);
recipe.AddIngredient(ModContent.ItemType<ConcentratedSpite>(), 2);
recipe.AddIngredient(ModContent.ItemType<DenziumBar>(), 5);
return new List<ModRecipe> { recipe };
return new List<ModRecipe> {recipe};
}
}
}

View File

@ -24,7 +24,7 @@ namespace Decimation.Content.Items.Ammo
item.height = 8;
item.knockBack = 1;
item.rare = Rarity.Orange.GetRarityValue();
item.value = Item.buyPrice(0, 0, 10);
item.value = Item.sellPrice(0, 0, 10);
item.consumable = true;
this.item.shootSpeed = 2f;
@ -40,7 +40,7 @@ namespace Decimation.Content.Items.Ammo
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>()});

View File

@ -1,5 +1,6 @@
using System.Collections.Generic;
using Decimation.Content.Buffs.Debuffs;
using Decimation.Content.Buffs.Buffs;
using Decimation.Content.Items.Ores;
using Decimation.Content.Tiles;
using Decimation.Lib.Items;
@ -10,9 +11,9 @@ using Terraria.ModLoader;
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 Projectile => "TitanicStyngerBolt";
protected override int Ammo => AmmoID.StyngerBolt;
@ -24,7 +25,7 @@ namespace Decimation.Content.Items.Ammo
item.rare = Rarity.Orange.GetRarityValue();
item.width = 8;
item.height = 8;
item.value = Item.buyPrice(0, 0, 10);
item.value = Item.sellPrice(0, 0, 10);
item.consumable = true;
this.item.shootSpeed = 2f;
@ -42,7 +43,7 @@ namespace Decimation.Content.Items.Ammo
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>()});

View File

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 318 B

View File

@ -20,12 +20,12 @@ namespace Decimation.Content.Items.Ammo
item.knockBack = 2;
item.width = 14;
item.height = 32;
item.value = Item.buyPrice(0, 0, 0, 55);
item.value = Item.sellPrice(0, 0, 0, 55);
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});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 B

After

Width:  |  Height:  |  Size: 343 B

View File

@ -26,7 +26,7 @@ namespace Decimation.Content.Items.Amulets
(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);

View File

@ -28,7 +28,7 @@ namespace Decimation.Content.Items.Amulets
(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});

View File

@ -25,7 +25,7 @@ namespace Decimation.Content.Items.Amulets
player.magicCrit += 3;
}
protected override List<ModRecipe> GetAdditionalRecipes()
protected override List<ModRecipe> GetRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});

View File

@ -1,9 +1,9 @@
using System.Collections.Generic;
using Decimation.Content.Buffs.Debuffs;
using Decimation.Lib.Amulets;
using Decimation.Lib.Amulets.Synergy;
using Decimation.Content.Items.Accessories;
using Decimation.Content.Synergies;
using Decimation.Lib.Amulets;
using Decimation.Lib.Amulets.Synergy;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@ -34,7 +34,7 @@ namespace Decimation.Content.Items.Amulets
modPlayer.amuletsBuffTime = 300;
}
protected override List<ModRecipe> GetAdditionalRecipes()
protected override List<ModRecipe> GetRecipes()
{
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 critical strike chances")
.AddEffect("+7 seconds of immunity to lava")
.AddEffect("+4% chances to inflict \"Slimed!\" debuff to ennemies on strikes")
.AddSynergy("The lava charm grant an additional 5 seconds of lava immunity");
.AddEffect("+4% chances to inflict \"Singed\" debuff to ennemies on strikes")
.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");
}
}
}

View File

@ -22,7 +22,7 @@ namespace Decimation.Content.Items.Amulets
player.rangedCrit += 3;
}
protected override List<ModRecipe> GetAdditionalRecipes()
protected override List<ModRecipe> GetRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});

View File

@ -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});

View File

@ -23,7 +23,7 @@ namespace Decimation.Content.Items.Amulets
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});

View File

@ -28,7 +28,7 @@ namespace Decimation.Content.Items.Amulets
modPlayer.amuletsBuffWhenAttacking = true;
}
protected override List<ModRecipe> GetAdditionalRecipes()
protected override List<ModRecipe> GetRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});

View File

@ -25,7 +25,7 @@ namespace Decimation.Content.Items.Amulets
(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);

View File

@ -54,7 +54,7 @@ namespace Decimation.Content.Items.Amulets
modPlayer.amuletsBuffTime = 300;
}
protected override List<ModRecipe> GetAdditionalRecipes()
protected override List<ModRecipe> GetRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> { TileID.TinkerersWorkbench }, true);

View File

@ -34,7 +34,7 @@ namespace Decimation.Content.Items.Armors.ScarabArmor
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);

View File

@ -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>()});

View File

@ -36,7 +36,7 @@ namespace Decimation.Content.Items.Armors.ScarabArmor
player.fireWalk = true;
}
protected override List<ModRecipe> GetAdditionalRecipes()
protected override List<ModRecipe> GetRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { ModContent.TileType<TitanForge>() });

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