Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f0f14e3dd |
2
.gitignore
vendored
@ -41,5 +41,3 @@
|
||||
/bin
|
||||
/Properties
|
||||
*.csproj
|
||||
|
||||
/.idea
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace Decimation.Content.Buffs.Buffs
|
||||
{
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace Decimation.Content.Buffs.Buffs
|
||||
{
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.DataStructures;
|
||||
|
||||
namespace Decimation.Content.Buffs.Buffs
|
||||
{
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
|
||||
namespace Decimation.Content.Buffs.Buffs
|
||||
{
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.DataStructures;
|
||||
|
||||
namespace Decimation.Content.Buffs.Buffs
|
||||
{
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
using Decimation.Content.Projectiles;
|
||||
using Decimation.Content.Projectiles.Item.Weapon;
|
||||
using Decimation.Lib.Buffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace Decimation.Content.Buffs.Buffs
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 429 B |
@ -1,5 +1,4 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace Decimation.Content.Buffs.Buffs
|
||||
{
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace Decimation.Content.Buffs.Debuffs
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace Decimation.Content.Buffs.Debuffs
|
||||
{
|
||||
@ -23,7 +24,6 @@ namespace Decimation.Content.Buffs.Debuffs
|
||||
{
|
||||
player.lifeRegen = 0;
|
||||
}
|
||||
|
||||
player.lifeRegenTime = 0;
|
||||
player.lifeRegen -= 3;
|
||||
|
||||
@ -36,7 +36,6 @@ namespace Decimation.Content.Buffs.Debuffs
|
||||
{
|
||||
npc.lifeRegen = 0;
|
||||
}
|
||||
|
||||
npc.lifeRegenExpectedLossPerSecond += 3;
|
||||
npc.lifeRegen -= 3;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 537 B After Width: | Height: | Size: 392 B |
@ -1,5 +1,4 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 392 B |
@ -1,5 +1,4 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 393 B After Width: | Height: | Size: 392 B |
@ -1,5 +1,6 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace Decimation.Content.Buffs.Debuffs
|
||||
@ -7,10 +8,7 @@ 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()
|
||||
@ -22,13 +20,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;
|
||||
}
|
||||
}
|
||||
@ -37,8 +35,7 @@ namespace Decimation.Content.Buffs.Debuffs
|
||||
{
|
||||
public override bool CanUseItem(Item item, Player player)
|
||||
{
|
||||
if (player.HasBuff(ModContent.BuffType<Hyperthermic>()) && item.healMana > 0) return false;
|
||||
return base.CanUseItem(item, player);
|
||||
return !(player.HasBuff(ModContent.BuffType<Hyperthermic>()) && item.healMana > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 486 B After Width: | Height: | Size: 392 B |
@ -1,5 +1,4 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 424 B |
@ -1,5 +1,4 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 396 B |
@ -1,5 +1,4 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@ -41,7 +40,7 @@ namespace Decimation.Content.Buffs.Debuffs
|
||||
{
|
||||
return !(item.UseSound != null && item.useStyle == 2);
|
||||
}
|
||||
return base.CanUseItem(item, player);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,3 @@
|
||||
using Decimation.Lib.Buffs;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.DataStructures;
|
||||
@ -42,7 +41,7 @@ namespace Decimation.Content.Buffs.Debuffs
|
||||
{
|
||||
return !(item.UseSound != null && item.useStyle == 2);
|
||||
}
|
||||
return base.CanUseItem(item, player);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 577 B After Width: | Height: | Size: 352 B |
@ -1,7 +1,12 @@
|
||||
using Terraria.ModLoader;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria;
|
||||
|
||||
namespace Decimation.Lib.Buffs
|
||||
namespace Decimation.Content.Buffs
|
||||
{
|
||||
internal abstract class DecimationBuff : ModBuff
|
||||
{
|
||||
@ -1,36 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@ -1,25 +0,0 @@
|
||||
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)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 72 B |
@ -1,23 +1,22 @@
|
||||
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;
|
||||
|
||||
@ -27,7 +26,7 @@ namespace Decimation.Content
|
||||
{
|
||||
Instance = this;
|
||||
|
||||
Properties = new ModProperties
|
||||
Properties = new ModProperties()
|
||||
{
|
||||
Autoload = true,
|
||||
AutoloadGores = true,
|
||||
@ -37,8 +36,6 @@ namespace Decimation.Content
|
||||
References.mod = this;
|
||||
}
|
||||
|
||||
public static Decimation Instance { set; get; }
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
@ -96,79 +93,74 @@ 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 Great Dune Wyrm", 5.7f,
|
||||
(Func<bool>) (() => DecimationWorld.downedDuneWyrm), "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 Ancient Dune Worm", 5.7f, (Func<bool>)(() => DecimationWorld.downedDuneWorm), "INSERT LATER");
|
||||
bossChecklist.Call("AddBossWithInfo", "Arachnus", 20f, (Func<bool>)(() => DecimationWorld.downedArachnus), "INSERT LATER");
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipeGroups()
|
||||
{
|
||||
RecipeGroup gems = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " Gem",
|
||||
RecipeGroup gems = new RecipeGroup(() => Lang.misc[37] + " Gem", new int[]
|
||||
{
|
||||
ItemID.Amethyst,
|
||||
ItemID.Topaz,
|
||||
ItemID.Emerald,
|
||||
ItemID.Sapphire,
|
||||
ItemID.Ruby,
|
||||
ItemID.Diamond);
|
||||
RecipeGroup.RegisterGroup(DecimationRecipeGroupID.AnyGem, gems);
|
||||
ItemID.Diamond,
|
||||
});
|
||||
|
||||
RecipeGroup threads = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " Thread",
|
||||
RecipeGroup threads = new RecipeGroup(() => Lang.misc[37] + " Thread", new int[]
|
||||
{
|
||||
ItemID.BlackThread,
|
||||
ItemID.GreenThread,
|
||||
ItemID.PinkThread);
|
||||
RecipeGroup.RegisterGroup(DecimationRecipeGroupID.AnyThread, threads);
|
||||
ItemID.PinkThread
|
||||
});
|
||||
|
||||
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);
|
||||
RecipeGroup.RegisterGroup("AnyGem", gems);
|
||||
RecipeGroup.RegisterGroup("AnyThread", threads);
|
||||
}
|
||||
|
||||
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.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);
|
||||
case DecimationModMessageType.DuneWorm:
|
||||
AncientDuneWormHead duneWorm = (AncientDuneWormHead)Main.npc[reader.ReadInt32()].modNPC;
|
||||
if (duneWorm != null && duneWorm.npc.active)
|
||||
{
|
||||
// TODO multiplayer
|
||||
//duneWorm.HandlePacket(reader);
|
||||
}
|
||||
break;
|
||||
case DecimationModMessageType.SpawnBoss:
|
||||
int type = reader.ReadInt32();
|
||||
int player = reader.ReadInt32();
|
||||
Main.PlaySound(15, (int) Main.player[player].position.X, (int) Main.player[player].position.Y, 0);
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal enum DecimationModMessageType : byte
|
||||
enum DecimationModMessageType : byte
|
||||
{
|
||||
Arachnus,
|
||||
DuneWyrm,
|
||||
AncientTombCrawler,
|
||||
DuneWorm,
|
||||
SpawnBoss
|
||||
}
|
||||
}
|
||||
@ -1,12 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Decimation.Content.Buffs.Buffs;
|
||||
using Decimation.Content.Items.Accessories;
|
||||
using Decimation.Content.Items.Amulets;
|
||||
using Decimation.Content.Items.Misc;
|
||||
using Decimation.Lib;
|
||||
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;
|
||||
@ -16,7 +15,7 @@ using Terraria.ModLoader.IO;
|
||||
|
||||
namespace Decimation.Content
|
||||
{
|
||||
public class DecimationPlayer : ModPlayer
|
||||
public class DecimationPlayer : DecimationModPlayer
|
||||
{
|
||||
// Amulet slot
|
||||
private Amulet _amuletSlotAmulet;
|
||||
@ -43,6 +42,7 @@ namespace Decimation.Content
|
||||
// Effects
|
||||
public bool hasCursedAccessory;
|
||||
public byte hyperStars;
|
||||
public byte soulFruits;
|
||||
|
||||
public bool isInCombat;
|
||||
public bool jestersQuiverEquiped;
|
||||
@ -58,7 +58,6 @@ namespace Decimation.Content
|
||||
|
||||
// Scarab shield
|
||||
public int solarCounter = 0;
|
||||
public byte soulFruits;
|
||||
public bool tideTurnerEquipped;
|
||||
public int ttDash;
|
||||
public int ttHit;
|
||||
@ -68,8 +67,8 @@ namespace Decimation.Content
|
||||
// Slimy Feet buff
|
||||
public bool wasJumping = false;
|
||||
|
||||
public ICollection<int> EquippedAccessories { get; } = new List<int>();
|
||||
public bool NextHitCrit { get; set; }
|
||||
public override bool HasShield { get; set; }
|
||||
public override bool HasLavaCharm { get; set; }
|
||||
|
||||
public Item AmuletSlotItem
|
||||
{
|
||||
@ -83,14 +82,12 @@ namespace Decimation.Content
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
AmuletSlotItem = new Item();
|
||||
AmuletSlotItem.SetDefaults(0, true);
|
||||
this.AmuletSlotItem = new Item();
|
||||
this.AmuletSlotItem.SetDefaults(0, true);
|
||||
}
|
||||
|
||||
public override void ResetEffects()
|
||||
{
|
||||
EquippedAccessories.Clear();
|
||||
|
||||
closeToEnchantedAnvil = false;
|
||||
jestersQuiverEquiped = false;
|
||||
deadeyesQuiverEquipped = false;
|
||||
@ -100,10 +97,13 @@ namespace Decimation.Content
|
||||
tideTurnerEquipped = false;
|
||||
vampire = false;
|
||||
|
||||
this.HasLavaCharm = false;
|
||||
this.HasShield = false;
|
||||
|
||||
hasCursedAccessory = false;
|
||||
|
||||
player.statManaMax2 += hyperStars * HyperStar.ManaHealAmount;
|
||||
player.statLifeMax2 += soulFruits * SoulFruit.LifeHealAmount;
|
||||
this.player.statManaMax2 += hyperStars * HyperStar.ManaHealAmount;
|
||||
this.player.statLifeMax2 += soulFruits * SoulFruit.LifeHealAmount;
|
||||
|
||||
if (combatTime > 360)
|
||||
{
|
||||
@ -117,8 +117,8 @@ namespace Decimation.Content
|
||||
amuletsBuffTime = 0;
|
||||
amuletsBuffWhenAttacking = false;
|
||||
|
||||
if (!player.HasBuff(ModContent.BuffType<SlimyFeet>())) lastJumpBoost = 0;
|
||||
if (!player.HasBuff(ModContent.BuffType<ScarabEndurance>()))
|
||||
if (!this.player.HasBuff(ModContent.BuffType<SlimyFeet>())) lastJumpBoost = 0;
|
||||
if (!this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()))
|
||||
{
|
||||
scarabEnduranceBuffTimeCounter = 0;
|
||||
scarabCounter = 0;
|
||||
@ -137,17 +137,17 @@ namespace Decimation.Content
|
||||
|
||||
return new TagCompound
|
||||
{
|
||||
{"amuletSlotItem", ItemIO.Save(AmuletSlotItem)},
|
||||
{"hyperStars", hyperStars},
|
||||
{"amuletSlotItem", ItemIO.Save(this.AmuletSlotItem)},
|
||||
{"hyperStars", this.hyperStars},
|
||||
{"soulFruits", soulFruits}
|
||||
};
|
||||
}
|
||||
|
||||
public override void Load(TagCompound tag)
|
||||
{
|
||||
AmuletSlotItem = ItemIO.Load(tag.GetCompound("amuletSlotItem"));
|
||||
hyperStars = tag.GetByte("hyperStars");
|
||||
soulFruits = tag.GetByte("soulFruits");
|
||||
this.AmuletSlotItem = ItemIO.Load(tag.GetCompound("amuletSlotItem"));
|
||||
this.hyperStars = tag.GetByte("hyperStars");
|
||||
this.soulFruits = tag.GetByte("soulFruits");
|
||||
}
|
||||
|
||||
// FIND AN ALTERNATIVE! THIS METHOD DOESN'T GET CALLED WITH EVERY WEAPONS
|
||||
@ -177,7 +177,7 @@ namespace Decimation.Content
|
||||
}
|
||||
|
||||
// Frost Amulet
|
||||
if (AmuletSlotItem.type == ModContent.ItemType<FrostAmulet>() && toCheck.arrow)
|
||||
if (this.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 (AmuletSlotItem.type == ModContent.ItemType<FrostAmulet>() && ammo.ammo == AmmoID.Arrow &&
|
||||
if (this.AmuletSlotItem.type == ModContent.ItemType<FrostAmulet>() && ammo.ammo == AmmoID.Arrow &&
|
||||
Main.rand.NextBool(50))
|
||||
return false;
|
||||
if (AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && weapon.thrown &&
|
||||
if (this.AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && weapon.thrown &&
|
||||
Main.rand.NextBool(50) && weapon.thrown)
|
||||
return false;
|
||||
|
||||
@ -225,15 +225,15 @@ namespace Decimation.Content
|
||||
{
|
||||
if (vampire)
|
||||
{
|
||||
player.head = 124;
|
||||
player.body = 85;
|
||||
player.legs = 72;
|
||||
this.player.head = 124;
|
||||
this.player.body = 85;
|
||||
this.player.legs = 72;
|
||||
}
|
||||
}
|
||||
|
||||
public override void PostUpdate()
|
||||
{
|
||||
oldStatDefense = player.statDefense;
|
||||
oldStatDefense = this.player.statDefense;
|
||||
|
||||
if (lastHitCounter >= 60)
|
||||
{
|
||||
@ -257,17 +257,15 @@ namespace Decimation.Content
|
||||
|
||||
public override void OnHitPvp(Item item, Player target, int damage, bool crit)
|
||||
{
|
||||
if (target.HasBuff(ModContent.BuffType<ScarabEndurance>())) player.AddBuff(BuffID.OnFire, 300);
|
||||
if (target.HasBuff(ModContent.BuffType<ScarabEndurance>())) this.player.AddBuff(BuffID.OnFire, 300);
|
||||
|
||||
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
|
||||
AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>())
|
||||
this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>())
|
||||
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
|
||||
target.AddBuff(amuletsBuff, amuletsBuffTime);
|
||||
|
||||
if (AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>())
|
||||
if (this.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)
|
||||
@ -276,18 +274,16 @@ namespace Decimation.Content
|
||||
combatTime = 0;
|
||||
|
||||
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
|
||||
AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>())
|
||||
this.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 &&
|
||||
(AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
|
||||
AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
|
||||
(this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
|
||||
this.AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
|
||||
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
|
||||
target.AddBuff(amuletsBuff, amuletsBuffTime);
|
||||
}
|
||||
@ -298,15 +294,15 @@ namespace Decimation.Content
|
||||
combatTime = 0;
|
||||
|
||||
if (amuletsBuffTime != 0 && amuletsBuff != 0 && amuletsBuffChances != 0 && amuletsBuffWhenAttacking &&
|
||||
(AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
|
||||
AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
|
||||
(this.AmuletSlotItem.type != ModContent.ItemType<MarbleAmulet>() ||
|
||||
this.AmuletSlotItem.type == ModContent.ItemType<MarbleAmulet>() && proj.thrown))
|
||||
if (Main.rand.Next(amuletsBuffChances, 100) < amuletsBuffChances)
|
||||
target.AddBuff(amuletsBuff, amuletsBuffTime);
|
||||
}
|
||||
|
||||
public override void OnHitByNPC(NPC npc, int damage, bool crit)
|
||||
{
|
||||
if (player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
|
||||
if (this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
|
||||
lastHitCounter == 0 &&
|
||||
!wasHurt)
|
||||
{
|
||||
@ -321,7 +317,7 @@ namespace Decimation.Content
|
||||
|
||||
if (graniteLinedTunicEquipped)
|
||||
{
|
||||
player.statLife += (int) (damage * 0.04f);
|
||||
this.player.statLife += (int) (damage * 0.04f);
|
||||
|
||||
if (Main.rand.Next(3, 100) < 3)
|
||||
npc.AddBuff(BuffID.Confused, 600);
|
||||
@ -329,32 +325,26 @@ namespace Decimation.Content
|
||||
|
||||
if (tideTurnerEquipped && Main.rand.NextBool(2))
|
||||
{
|
||||
player.statLife += damage;
|
||||
Main.NewText("Tide Turner");
|
||||
this.player.statLife += damage;
|
||||
}
|
||||
|
||||
foreach (Player otherPlayer in Main.player)
|
||||
if (otherPlayer.whoAmI != player.whoAmI)
|
||||
if (otherPlayer.whoAmI != this.player.whoAmI)
|
||||
if (otherPlayer.GetModPlayer<DecimationPlayer>().AmuletSlotItem.type ==
|
||||
ModContent.ItemType<GraniteAmulet>() && otherPlayer.team == player.team)
|
||||
ModContent.ItemType<GraniteAmulet>() && otherPlayer.team == this.player.team)
|
||||
{
|
||||
player.statLife += (int) (damage * 0.03f);
|
||||
this.player.statLife += (int) (damage * 0.03f);
|
||||
break;
|
||||
}
|
||||
|
||||
if (AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
|
||||
if (this.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 (player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
|
||||
if (this.player.HasBuff(ModContent.BuffType<ScarabEndurance>()) && scarabCounter > 0 &&
|
||||
lastHitCounter == 0 &&
|
||||
!wasHurt)
|
||||
{
|
||||
@ -373,7 +363,7 @@ namespace Decimation.Content
|
||||
|
||||
if (graniteLinedTunicEquipped)
|
||||
{
|
||||
player.statLife += (int) (damage * 0.04f);
|
||||
this.player.statLife += (int) (damage * 0.04f);
|
||||
|
||||
if (proj.npcProj && Main.rand.Next(3, 100) < 3)
|
||||
Main.npc[proj.owner].AddBuff(BuffID.Confused, 600);
|
||||
@ -382,99 +372,26 @@ namespace Decimation.Content
|
||||
}
|
||||
|
||||
foreach (Player otherPlayer in Main.player)
|
||||
if (otherPlayer.whoAmI != player.whoAmI)
|
||||
if (otherPlayer.whoAmI != this.player.whoAmI)
|
||||
if (otherPlayer.GetModPlayer<DecimationPlayer>().AmuletSlotItem.type ==
|
||||
ModContent.ItemType<GraniteAmulet>() && otherPlayer.team == player.team)
|
||||
ModContent.ItemType<GraniteAmulet>() && otherPlayer.team == this.player.team)
|
||||
{
|
||||
player.statLife += (int) (damage * 0.03f);
|
||||
this.player.statLife += (int) (damage * 0.03f);
|
||||
break;
|
||||
}
|
||||
|
||||
if (AmuletSlotItem.type == ModContent.ItemType<CrystalAmulet>() && Main.rand.NextBool(25))
|
||||
if (this.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.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);
|
||||
_amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage);
|
||||
}
|
||||
|
||||
public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit)
|
||||
{
|
||||
_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);
|
||||
}
|
||||
_amuletSlotAmulet?.Synergy.OnHitPlayer(this, ref damage);
|
||||
}
|
||||
|
||||
public void DashMovement()
|
||||
@ -484,80 +401,80 @@ namespace Decimation.Content
|
||||
if (ttHit < 0)
|
||||
{
|
||||
Rectangle rectangle =
|
||||
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);
|
||||
new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0),
|
||||
(int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8,
|
||||
this.player.height + 8);
|
||||
for (int i = 0; i < 200; i++)
|
||||
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly)
|
||||
{
|
||||
NPC nPC = Main.npc[i];
|
||||
Rectangle rect = nPC.getRect();
|
||||
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
|
||||
if (rectangle.Intersects(rect) && (nPC.noTileCollide || this.player.CanHit(nPC)))
|
||||
{
|
||||
float num = dashDamages * player.meleeDamage;
|
||||
float num = dashDamages * this.player.meleeDamage;
|
||||
float num2 = 9f;
|
||||
bool crit = false;
|
||||
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);
|
||||
if (this.player.kbGlove) num2 *= 2f;
|
||||
if (this.player.kbBuff) num2 *= 1.5f;
|
||||
if (Main.rand.Next(100) < this.player.meleeCrit) crit = true;
|
||||
int num3 = this.player.direction;
|
||||
if (this.player.velocity.X < 0f) num3 = -1;
|
||||
if (this.player.velocity.X > 0f) num3 = 1;
|
||||
if (this.player.whoAmI == Main.myPlayer)
|
||||
this.player.ApplyDamageToNPC(nPC, (int) num, num2, num3, crit);
|
||||
ttDash = 10;
|
||||
dashDelay = 30;
|
||||
player.velocity.X = (0f - num3) * 9f;
|
||||
player.velocity.Y = -4f;
|
||||
player.immune = true;
|
||||
player.immuneNoBlink = true;
|
||||
player.immuneTime = 4;
|
||||
this.player.velocity.X = (0f - num3) * 9f;
|
||||
this.player.velocity.Y = -4f;
|
||||
this.player.immune = true;
|
||||
this.player.immuneNoBlink = true;
|
||||
this.player.immuneTime = 4;
|
||||
ttHit = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((!player.controlLeft || player.velocity.X >= 0f) &&
|
||||
(!player.controlRight || player.velocity.X <= 0f))
|
||||
else if ((!this.player.controlLeft || this.player.velocity.X >= 0f) &&
|
||||
(!this.player.controlRight || this.player.velocity.X <= 0f))
|
||||
{
|
||||
player.velocity.X = player.velocity.X * 0.95f;
|
||||
this.player.velocity.X = this.player.velocity.X * 0.95f;
|
||||
}
|
||||
}
|
||||
|
||||
if (dash == 3 && dashDelay < 0 && player.whoAmI == Main.myPlayer)
|
||||
if (dash == 3 && dashDelay < 0 && this.player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Rectangle rectangle2 =
|
||||
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);
|
||||
new Rectangle((int) (this.player.position.X + this.player.velocity.X * 0.5 - 4.0),
|
||||
(int) (this.player.position.Y + this.player.velocity.Y * 0.5 - 4.0), this.player.width + 8,
|
||||
this.player.height + 8);
|
||||
for (int j = 0; j < 200; j++)
|
||||
if (Main.npc[j].active && !Main.npc[j].dontTakeDamage && !Main.npc[j].friendly &&
|
||||
Main.npc[j].immune[player.whoAmI] <= 0)
|
||||
Main.npc[j].immune[this.player.whoAmI] <= 0)
|
||||
{
|
||||
NPC nPC2 = Main.npc[j];
|
||||
Rectangle rect2 = nPC2.getRect();
|
||||
if (rectangle2.Intersects(rect2) && (nPC2.noTileCollide || player.CanHit(nPC2)))
|
||||
if (rectangle2.Intersects(rect2) && (nPC2.noTileCollide || this.player.CanHit(nPC2)))
|
||||
{
|
||||
float num4 = 150f * player.meleeDamage;
|
||||
float num4 = 150f * this.player.meleeDamage;
|
||||
float num5 = 9f;
|
||||
bool crit2 = false;
|
||||
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)
|
||||
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)
|
||||
{
|
||||
player.ApplyDamageToNPC(nPC2, (int) num4, num5, direction, crit2);
|
||||
int num6 = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f,
|
||||
this.player.ApplyDamageToNPC(nPC2, (int) num4, num5, direction, crit2);
|
||||
int num6 = Projectile.NewProjectile(this.player.Center.X, this.player.Center.Y, 0f, 0f,
|
||||
608, 150, 15f, Main.myPlayer);
|
||||
Main.projectile[num6].Kill();
|
||||
}
|
||||
|
||||
nPC2.immune[player.whoAmI] = 6;
|
||||
player.immune = true;
|
||||
player.immuneNoBlink = true;
|
||||
player.immuneTime = 4;
|
||||
nPC2.immune[this.player.whoAmI] = 6;
|
||||
this.player.immune = true;
|
||||
this.player.immuneNoBlink = true;
|
||||
this.player.immuneTime = 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -572,43 +489,43 @@ namespace Decimation.Content
|
||||
{
|
||||
float num7 = 12f;
|
||||
float num8 = 0.992f;
|
||||
float num9 = Math.Max(player.accRunSpeed, player.maxRunSpeed);
|
||||
float num9 = Math.Max(this.player.accRunSpeed, this.player.maxRunSpeed);
|
||||
float num10 = 0.96f;
|
||||
int num11 = 20;
|
||||
if (dash == 1)
|
||||
{
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
int num12 = player.velocity.Y != 0f
|
||||
int num12 = this.player.velocity.Y != 0f
|
||||
? Dust.NewDust(
|
||||
new Vector2(player.position.X,
|
||||
player.position.Y + player.height / 2 - 8f), player.width, 16, 31,
|
||||
new Vector2(this.player.position.X,
|
||||
this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31,
|
||||
0f, 0f, 100, default, 1.4f)
|
||||
: Dust.NewDust(
|
||||
new Vector2(player.position.X, player.position.Y + player.height - 4f),
|
||||
player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
|
||||
new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f),
|
||||
this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
|
||||
Dust obj = Main.dust[num12];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[num12].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
||||
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
|
||||
}
|
||||
}
|
||||
else if (dash == 2)
|
||||
{
|
||||
for (int l = 0; l < 0; l++)
|
||||
{
|
||||
int num13 = player.velocity.Y != 0f
|
||||
int num13 = this.player.velocity.Y != 0f
|
||||
? Dust.NewDust(
|
||||
new Vector2(player.position.X,
|
||||
player.position.Y + player.height / 2 - 8f), player.width, 16, 31,
|
||||
new Vector2(this.player.position.X,
|
||||
this.player.position.Y + this.player.height / 2 - 8f), this.player.width, 16, 31,
|
||||
0f, 0f, 100, default, 1.4f)
|
||||
: Dust.NewDust(
|
||||
new Vector2(player.position.X, player.position.Y + player.height - 4f),
|
||||
player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
|
||||
new Vector2(this.player.position.X, this.player.position.Y + this.player.height - 4f),
|
||||
this.player.width, 8, 31, 0f, 0f, 100, default, 1.4f);
|
||||
Dust obj2 = Main.dust[num13];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[num13].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
||||
Main.dust[num13].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||
Main.dust[num13].shader = GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
|
||||
}
|
||||
|
||||
num8 = 0.985f;
|
||||
@ -619,13 +536,13 @@ namespace Decimation.Content
|
||||
{
|
||||
for (int m = 0; m < 4; m++)
|
||||
{
|
||||
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);
|
||||
int num14 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f),
|
||||
this.player.width, this.player.height - 8, 6, 0f, 0f, 100, default, 1.7f);
|
||||
Dust obj3 = Main.dust[num14];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[num14].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
||||
Main.dust[num14].shader =
|
||||
GameShaders.Armor.GetSecondaryShader(player.ArmorSetDye(), player);
|
||||
GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player);
|
||||
Main.dust[num14].noGravity = true;
|
||||
if (Main.rand.Next(2) == 0) Main.dust[num14].fadeIn = 0.5f;
|
||||
}
|
||||
@ -639,12 +556,12 @@ namespace Decimation.Content
|
||||
{
|
||||
for (int n = 0; n < 2; n++)
|
||||
{
|
||||
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);
|
||||
int num15 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y + 4f),
|
||||
this.player.width, this.player.height - 8, 229, 0f, 0f, 100, default, 1.2f);
|
||||
Dust obj4 = Main.dust[num15];
|
||||
obj4.velocity *= 0.1f;
|
||||
Main.dust[num15].scale *= 1f + Main.rand.Next(20) * 0.01f;
|
||||
Main.dust[num15].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player);
|
||||
Main.dust[num15].shader = GameShaders.Armor.GetSecondaryShader(this.player.cWings, this.player);
|
||||
Main.dust[num15].noGravity = true;
|
||||
if (Main.rand.Next(2) == 0) Main.dust[num15].fadeIn = 0.3f;
|
||||
}
|
||||
@ -656,25 +573,25 @@ namespace Decimation.Content
|
||||
|
||||
if (dash > 0)
|
||||
{
|
||||
player.vortexStealthActive = false;
|
||||
if (player.velocity.X > num7 || player.velocity.X < 0f - num7)
|
||||
this.player.vortexStealthActive = false;
|
||||
if (this.player.velocity.X > num7 || this.player.velocity.X < 0f - num7)
|
||||
{
|
||||
player.velocity.X = player.velocity.X * num8;
|
||||
this.player.velocity.X = this.player.velocity.X * num8;
|
||||
}
|
||||
else if (player.velocity.X > num9 || player.velocity.X < 0f - num9)
|
||||
else if (this.player.velocity.X > num9 || this.player.velocity.X < 0f - num9)
|
||||
{
|
||||
player.velocity.X = player.velocity.X * num10;
|
||||
this.player.velocity.X = this.player.velocity.X * num10;
|
||||
}
|
||||
else
|
||||
{
|
||||
dashDelay = num11;
|
||||
if (player.velocity.X < 0f)
|
||||
player.velocity.X = 0f - num9;
|
||||
else if (player.velocity.X > 0f) player.velocity.X = num9;
|
||||
if (this.player.velocity.X < 0f)
|
||||
this.player.velocity.X = 0f - num9;
|
||||
else if (this.player.velocity.X > 0f) this.player.velocity.X = num9;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (dash > 0 && !player.mount.Active)
|
||||
else if (dash > 0 && !this.player.mount.Active)
|
||||
{
|
||||
if (dash == 1)
|
||||
{
|
||||
@ -682,7 +599,7 @@ namespace Decimation.Content
|
||||
bool flag = false;
|
||||
if (dashTime > 0) dashTime--;
|
||||
if (dashTime < 0) dashTime++;
|
||||
if (player.controlRight && player.releaseRight)
|
||||
if (this.player.controlRight && this.player.releaseRight)
|
||||
{
|
||||
if (dashTime > 0)
|
||||
{
|
||||
@ -695,7 +612,7 @@ namespace Decimation.Content
|
||||
dashTime = 15;
|
||||
}
|
||||
}
|
||||
else if (player.controlLeft && player.releaseLeft)
|
||||
else if (this.player.controlLeft && this.player.releaseLeft)
|
||||
{
|
||||
if (dashTime < 0)
|
||||
{
|
||||
@ -711,20 +628,20 @@ namespace Decimation.Content
|
||||
|
||||
if (flag)
|
||||
{
|
||||
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))
|
||||
this.player.velocity.X = 16.9f * num16;
|
||||
Point point = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2,
|
||||
this.player.gravDir * (0f - this.player.height) / 2f +
|
||||
this.player.gravDir * 2f)).ToTileCoordinates();
|
||||
Point point2 = (this.player.Center + new Vector2(num16 * this.player.width / 2 + 2, 0f))
|
||||
.ToTileCoordinates();
|
||||
if (WorldGen.SolidOrSlopedTile(point.X, point.Y) ||
|
||||
WorldGen.SolidOrSlopedTile(point2.X, point2.Y))
|
||||
player.velocity.X = player.velocity.X / 2f;
|
||||
this.player.velocity.X = this.player.velocity.X / 2f;
|
||||
dashDelay = -1;
|
||||
for (int num17 = 0; num17 < 20; num17++)
|
||||
{
|
||||
int num18 = Dust.NewDust(new Vector2(player.position.X, player.position.Y),
|
||||
player.width, player.height, 31, 0f, 0f, 100, default, 2f);
|
||||
int num18 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
|
||||
this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[num18];
|
||||
dust.position.X = dust.position.X + Main.rand.Next(-5, 6);
|
||||
Dust dust2 = Main.dust[num18];
|
||||
@ -733,20 +650,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(player.cShoe, player);
|
||||
GameShaders.Armor.GetSecondaryShader(this.player.cShoe, this.player);
|
||||
}
|
||||
|
||||
int num19 = Gore.NewGore(
|
||||
new Vector2(player.position.X + player.width / 2 - 24f,
|
||||
player.position.Y + player.height / 2 - 34f), default,
|
||||
new Vector2(this.player.position.X + this.player.width / 2 - 24f,
|
||||
this.player.position.Y + this.player.height / 2 - 34f), default,
|
||||
Main.rand.Next(61, 64));
|
||||
Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f;
|
||||
Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f;
|
||||
Gore obj6 = Main.gore[num19];
|
||||
obj6.velocity *= 0.4f;
|
||||
num19 = Gore.NewGore(
|
||||
new Vector2(player.position.X + player.width / 2 - 24f,
|
||||
player.position.Y + player.height / 2 - 14f), default,
|
||||
new Vector2(this.player.position.X + this.player.width / 2 - 24f,
|
||||
this.player.position.Y + this.player.height / 2 - 14f), default,
|
||||
Main.rand.Next(61, 64));
|
||||
Main.gore[num19].velocity.X = Main.rand.Next(-50, 51) * 0.01f;
|
||||
Main.gore[num19].velocity.Y = Main.rand.Next(-50, 51) * 0.01f;
|
||||
@ -760,7 +677,7 @@ namespace Decimation.Content
|
||||
bool flag2 = false;
|
||||
if (dashTime > 0) dashTime--;
|
||||
if (dashTime < 0) dashTime++;
|
||||
if (player.controlRight && player.releaseRight)
|
||||
if (this.player.controlRight && this.player.releaseRight)
|
||||
{
|
||||
if (dashTime > 0)
|
||||
{
|
||||
@ -773,7 +690,7 @@ namespace Decimation.Content
|
||||
dashTime = 15;
|
||||
}
|
||||
}
|
||||
else if (player.controlLeft && player.releaseLeft)
|
||||
else if (this.player.controlLeft && this.player.releaseLeft)
|
||||
{
|
||||
if (dashTime < 0)
|
||||
{
|
||||
@ -789,21 +706,21 @@ namespace Decimation.Content
|
||||
|
||||
if (flag2)
|
||||
{
|
||||
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))
|
||||
this.player.velocity.X = 14.5f * num20;
|
||||
Point point3 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2,
|
||||
this.player.gravDir * (0f - this.player.height) / 2f +
|
||||
this.player.gravDir * 2f)).ToTileCoordinates();
|
||||
Point point4 = (this.player.Center + new Vector2(num20 * this.player.width / 2 + 2, 0f))
|
||||
.ToTileCoordinates();
|
||||
if (WorldGen.SolidOrSlopedTile(point3.X, point3.Y) ||
|
||||
WorldGen.SolidOrSlopedTile(point4.X, point4.Y))
|
||||
player.velocity.X = player.velocity.X / 2f;
|
||||
this.player.velocity.X = this.player.velocity.X / 2f;
|
||||
dashDelay = -1;
|
||||
ttDash = 15;
|
||||
for (int num21 = 0; num21 < 0; num21++)
|
||||
{
|
||||
int num22 = Dust.NewDust(new Vector2(player.position.X, player.position.Y),
|
||||
player.width, player.height, 31, 0f, 0f, 100, default, 2f);
|
||||
int num22 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
|
||||
this.player.width, this.player.height, 31, 0f, 0f, 100, default, 2f);
|
||||
Dust dust3 = Main.dust[num22];
|
||||
dust3.position.X = dust3.position.X + Main.rand.Next(-5, 6);
|
||||
Dust dust4 = Main.dust[num22];
|
||||
@ -812,7 +729,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(player.cShield, player);
|
||||
GameShaders.Armor.GetSecondaryShader(this.player.cShield, this.player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -822,7 +739,7 @@ namespace Decimation.Content
|
||||
bool flag3 = false;
|
||||
if (dashTime > 0) dashTime--;
|
||||
if (dashTime < 0) dashTime++;
|
||||
if (player.controlRight && player.releaseRight)
|
||||
if (this.player.controlRight && this.player.releaseRight)
|
||||
{
|
||||
if (dashTime > 0)
|
||||
{
|
||||
@ -835,7 +752,7 @@ namespace Decimation.Content
|
||||
dashTime = 15;
|
||||
}
|
||||
}
|
||||
else if (player.controlLeft && player.releaseLeft)
|
||||
else if (this.player.controlLeft && this.player.releaseLeft)
|
||||
{
|
||||
if (dashTime < 0)
|
||||
{
|
||||
@ -851,20 +768,20 @@ namespace Decimation.Content
|
||||
|
||||
if (flag3)
|
||||
{
|
||||
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))
|
||||
this.player.velocity.X = 21.9f * num23;
|
||||
Point point5 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2,
|
||||
this.player.gravDir * (0f - this.player.height) / 2f +
|
||||
this.player.gravDir * 2f)).ToTileCoordinates();
|
||||
Point point6 = (this.player.Center + new Vector2(num23 * this.player.width / 2 + 2, 0f))
|
||||
.ToTileCoordinates();
|
||||
if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) ||
|
||||
WorldGen.SolidOrSlopedTile(point6.X, point6.Y))
|
||||
player.velocity.X = player.velocity.X / 2f;
|
||||
this.player.velocity.X = this.player.velocity.X / 2f;
|
||||
dashDelay = -1;
|
||||
for (int num24 = 0; num24 < 20; num24++)
|
||||
{
|
||||
int num25 = Dust.NewDust(new Vector2(player.position.X, player.position.Y),
|
||||
player.width, player.height, 6, 0f, 0f, 100, default, 2f);
|
||||
int num25 = Dust.NewDust(new Vector2(this.player.position.X, this.player.position.Y),
|
||||
this.player.width, this.player.height, 6, 0f, 0f, 100, default, 2f);
|
||||
Dust dust5 = Main.dust[num25];
|
||||
dust5.position.X = dust5.position.X + Main.rand.Next(-5, 6);
|
||||
Dust dust6 = Main.dust[num25];
|
||||
@ -873,7 +790,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(player.ArmorSetDye(), player);
|
||||
GameShaders.Armor.GetSecondaryShader(this.player.ArmorSetDye(), this.player);
|
||||
Main.dust[num25].noGravity = true;
|
||||
Main.dust[num25].fadeIn = 0.5f;
|
||||
}
|
||||
@ -894,11 +811,22 @@ namespace Decimation.Content
|
||||
float speedX = (float) Math.Cos(currentAngle) * speed;
|
||||
float speedY = (float) Math.Sin(currentAngle) * speed;
|
||||
|
||||
Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileID.CrystalShard, 20,
|
||||
5, player.whoAmI);
|
||||
Projectile.NewProjectile(this.player.Center, new Vector2(speedX, speedY), ProjectileID.CrystalShard, 20,
|
||||
5, this.player.whoAmI);
|
||||
|
||||
currentAngle += angleDifference;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class PlayerPropertiesUpdater : GlobalItem
|
||||
{
|
||||
public override void UpdateAccessory(Item item, Player player, bool hideVisual)
|
||||
{
|
||||
DecimationPlayer modPlayer = player.GetModPlayer<DecimationPlayer>();
|
||||
if (item.type == ItemID.CobaltShield || item.type == ItemID.AnkhShield ||
|
||||
item.type == ItemID.PaladinsShield || item.type == ItemID.ObsidianShield) modPlayer.HasShield = true;
|
||||
if (item.type == ItemID.LavaCharm) modPlayer.HasLavaCharm = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
namespace Decimation.Content
|
||||
{
|
||||
public class DecimationRecipeGroupID
|
||||
{
|
||||
public const string AnyGem = "AnyGem";
|
||||
public const string AnyThread = "AnyThread";
|
||||
public const string CorruptedWoodAxes = "CorruptedAxes";
|
||||
public const string CorruptedWoodHammers = "CorruptedHammers";
|
||||
public const string CorruptedWoodPickaxes = "CorruptedPickaxes";
|
||||
}
|
||||
}
|
||||
@ -1,26 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Decimation.Content.Projectiles.Boss.DuneWyrm;
|
||||
using Decimation.Content.Structures;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.Generation;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.World.Generation;
|
||||
using Terraria.GameContent.Generation;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Decimation.Content.Structures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace Decimation.Content
|
||||
{
|
||||
public class DecimationWorld : ModWorld
|
||||
{
|
||||
public static bool downedBloodshotEye;
|
||||
public static bool downedDuneWyrm;
|
||||
public static bool downedDuneWorm;
|
||||
public static bool downedArachnus;
|
||||
public static bool downedWyvern;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
downedBloodshotEye = false;
|
||||
downedDuneWyrm = false;
|
||||
downedDuneWorm = false;
|
||||
downedArachnus = false;
|
||||
downedWyvern = false;
|
||||
}
|
||||
@ -29,7 +31,7 @@ namespace Decimation.Content
|
||||
{
|
||||
var downed = new List<string>();
|
||||
if (downedBloodshotEye) downed.Add("downedBloodshotEye");
|
||||
if (downedDuneWyrm) downed.Add("downedDuneWyrm");
|
||||
if (downedDuneWorm) downed.Add("downedDuneWorm");
|
||||
if (downedArachnus) downed.Add("downedArachnus");
|
||||
if (downedWyvern) downed.Add("downedWyvern");
|
||||
return new TagCompound {
|
||||
@ -40,17 +42,15 @@ namespace Decimation.Content
|
||||
{
|
||||
var downed = tag.GetList<string>("downed");
|
||||
downedBloodshotEye = downed.Contains("downedBloodshotEye");
|
||||
downedDuneWyrm = downed.Contains("downedDuneWyrm");
|
||||
downedDuneWorm = downed.Contains("downedDuneWorm");
|
||||
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] = downedDuneWyrm;
|
||||
flags[1] = downedDuneWorm;
|
||||
flags[2] = downedArachnus;
|
||||
flags[3] = downedWyvern;
|
||||
writer.Write(flags);
|
||||
@ -59,7 +59,7 @@ namespace Decimation.Content
|
||||
{
|
||||
BitsByte flags = reader.ReadByte();
|
||||
downedBloodshotEye = flags[0];
|
||||
downedDuneWyrm = flags[1];
|
||||
downedDuneWorm = flags[1];
|
||||
downedArachnus = flags[2];
|
||||
downedWyvern = flags[3];
|
||||
}
|
||||
@ -69,19 +69,19 @@ namespace Decimation.Content
|
||||
if (loadVersion == 1)
|
||||
{
|
||||
byte flags = reader.ReadByte();
|
||||
downedBloodshotEye = ((flags & 1) != 0);
|
||||
downedDuneWyrm = ((flags & 2) != 0); //double flag numbers with each new boss
|
||||
downedArachnus = ((flags & 4) != 0);
|
||||
downedWyvern = ((flags & 8) != 0);
|
||||
DecimationWorld.downedBloodshotEye = ((flags & 1) != 0);
|
||||
DecimationWorld.downedDuneWorm = ((flags & 2) != 0); //double flag numbers with each new boss
|
||||
DecimationWorld.downedArachnus = ((flags & 4) != 0);
|
||||
DecimationWorld.downedWyvern = ((flags & 8) != 0);
|
||||
}
|
||||
else if (loadVersion == 2)
|
||||
{
|
||||
byte flags = reader.ReadByte();
|
||||
byte flags2 = reader.ReadByte();
|
||||
downedBloodshotEye = ((flags & 1) != 0);
|
||||
downedDuneWyrm = ((flags & 2) != 0);
|
||||
downedArachnus = ((flags & 4) != 0);
|
||||
downedWyvern = ((flags & 8) != 0);
|
||||
DecimationWorld.downedBloodshotEye = ((flags & 1) != 0);
|
||||
DecimationWorld.downedDuneWorm = ((flags & 2) != 0);
|
||||
DecimationWorld.downedArachnus = ((flags & 4) != 0);
|
||||
DecimationWorld.downedWyvern = ((flags & 8) != 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.width = 46;
|
||||
item.height = 62;
|
||||
item.rare = Rarity.LightPurple.GetRarityValue();
|
||||
this.item.value = Item.sellPrice(0, 4);
|
||||
this.item.value = Item.buyPrice(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> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<EnchantedAnvil>()});
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.height = 62;
|
||||
item.rare = Rarity.LightPurple.GetRarityValue();
|
||||
|
||||
this.item.value = Item.sellPrice(0, 4);
|
||||
this.item.value = Item.buyPrice(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> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
|
||||
|
||||
|
||||
@ -15,14 +15,14 @@ namespace Decimation.Content.Items.Accessories
|
||||
|
||||
protected override void InitAccessory()
|
||||
{
|
||||
item.width = 35;
|
||||
item.height = 22;
|
||||
item.width = 24;
|
||||
item.height = 24;
|
||||
item.rare = Rarity.Green.GetRarityValue();
|
||||
item.value = Item.sellPrice(0, 0, 0, 10);
|
||||
item.defense = 2;
|
||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
||||
this.item.defense = 2;
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.GlassKiln}, true);
|
||||
|
||||
@ -39,5 +39,7 @@ 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));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 549 B After Width: | Height: | Size: 524 B |
@ -22,10 +22,10 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.width = 30;
|
||||
item.height = 30;
|
||||
item.rare = Rarity.Red.GetRarityValue();
|
||||
this.item.value = Item.sellPrice(0, 15);
|
||||
this.item.value = Item.buyPrice(0, 15);
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
|
||||
recipe.AddIngredient(ModContent.ItemType<JestersQuiver>());
|
||||
|
||||
@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.width = 46;
|
||||
item.height = 62;
|
||||
item.rare = Rarity.LightPurple.GetRarityValue();
|
||||
this.item.value = Item.sellPrice(0, 4);
|
||||
this.item.value = Item.buyPrice(0, 4);
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
|
||||
@ -17,10 +17,10 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.width = 62;
|
||||
item.height = 46;
|
||||
item.rare = Rarity.Green.GetRarityValue();
|
||||
this.item.value = Item.sellPrice(0, 0, 0, 10);
|
||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils}, true);
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.width = 24;
|
||||
item.height = 32;
|
||||
item.rare = Rarity.Lime.GetRarityValue();
|
||||
this.item.value = Item.sellPrice(0, 50);
|
||||
this.item.value = Item.buyPrice(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> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()});
|
||||
|
||||
|
||||
@ -17,10 +17,10 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.width = 62;
|
||||
item.height = 46;
|
||||
item.rare = Rarity.Green.GetRarityValue();
|
||||
this.item.value = Item.sellPrice(0, 0, 0, 10);
|
||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.MythrilAnvil}, true);
|
||||
|
||||
|
||||
@ -17,10 +17,10 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.width = 54;
|
||||
item.height = 46;
|
||||
item.rare = Rarity.Green.GetRarityValue();
|
||||
this.item.value = Item.sellPrice(0, 0, 0, 10);
|
||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils}, true);
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
|
||||
player.statDefense += 2;
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils});
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ namespace Decimation.Content.Items.Accessories
|
||||
player.rangedCrit += 5;
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ namespace Decimation.Content.Items.Accessories
|
||||
player.thrownCrit += 3;
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.Loom }, false);
|
||||
|
||||
|
||||
@ -13,11 +13,11 @@ namespace Decimation.Content.Items.Accessories
|
||||
|
||||
protected override void InitAccessory()
|
||||
{
|
||||
item.width = 32;
|
||||
item.height = 32;
|
||||
item.width = 20;
|
||||
item.height = 20;
|
||||
item.rare = Rarity.Rainbow.GetRarityValue();
|
||||
item.value = Item.sellPrice(gold: 5);
|
||||
item.expert = true;
|
||||
this.item.value = Item.buyPrice(0, 5);
|
||||
this.item.expert = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
|
||||
|
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 407 B |
@ -21,7 +21,7 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.rare = Rarity.Green.GetRarityValue();
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.MythrilAnvil }, false);
|
||||
|
||||
|
||||
@ -19,10 +19,10 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.width = 32;
|
||||
item.height = 32;
|
||||
item.rare = Rarity.Green.GetRarityValue();
|
||||
this.item.value = Item.sellPrice(0, 0, 0, 10);
|
||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.MythrilAnvil}, true);
|
||||
|
||||
|
||||
@ -1,49 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Decimation.Content.Buffs.Debuffs;
|
||||
using Decimation.Lib.Items;
|
||||
using Decimation.Lib.Util;
|
||||
using Microsoft.Xna.Framework;
|
||||
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 => "Your attackers gain Singed for 6 seconds.";
|
||||
protected override string ItemTooltip => "WIP";
|
||||
|
||||
protected override void InitAccessory()
|
||||
{
|
||||
item.width = 24;
|
||||
item.height = 24;
|
||||
item.rare = Rarity.Green.GetRarityValue();
|
||||
item.value = Item.sellPrice(0, 0, 2);
|
||||
item.value = Item.buyPrice(0, 0, 2);
|
||||
item.defense = 1;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
player.EquipAccessory(this);
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() {TileID.Furnaces}, true);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 315 B |
@ -14,7 +14,7 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.width = 30;
|
||||
item.height = 28;
|
||||
item.rare = Rarity.Rainbow.GetRarityValue();
|
||||
this.item.value = Item.sellPrice(0, 45);
|
||||
this.item.value = Item.buyPrice(0, 45);
|
||||
this.item.expert = true;
|
||||
}
|
||||
|
||||
|
||||
@ -18,10 +18,10 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.height = 24;
|
||||
item.rare = Rarity.Green.GetRarityValue();
|
||||
|
||||
this.item.value = Item.sellPrice(0, 0, 0, 10);
|
||||
this.item.value = Item.buyPrice(0, 0, 0, 10);
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.WorkBenches}, true);
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ namespace Decimation.Content.Items.Accessories
|
||||
item.width = 46;
|
||||
item.height = 36;
|
||||
item.rare = Rarity.Rainbow.GetRarityValue();
|
||||
item.value = Item.sellPrice(0, 3);
|
||||
item.value = Item.buyPrice(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> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<ChlorophyteAnvil>()}, false);
|
||||
|
||||
|
||||
@ -1,56 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 589 B |
@ -1,75 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 822 B |
@ -1,76 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 201 B |
@ -1,108 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 204 B |
@ -1,111 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 201 B |
@ -1,115 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 504 B |
@ -1,47 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,56 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 519 B |
@ -1,46 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 471 B |
@ -1,51 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 594 B |
@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Decimation.Content.Items.Misc.ConcentratedSouls;
|
||||
using Decimation.Content.Items.Misc.CondensedSouls;
|
||||
using Decimation.Content.Items.Ores;
|
||||
using Decimation.Content.Projectiles.Item.Accessory;
|
||||
using Decimation.Content.Projectiles;
|
||||
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.sellPrice(0, 5);
|
||||
this.item.value = Item.buyPrice(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> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
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<ConcentratedSpite>(), 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<CondensedSpite>(), 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<DenziumBar>(), 5);
|
||||
|
||||
return new List<ModRecipe> {recipe};
|
||||
return new List<ModRecipe> { recipe };
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -24,7 +24,7 @@ namespace Decimation.Content.Items.Ammo
|
||||
item.height = 8;
|
||||
item.knockBack = 1;
|
||||
item.rare = Rarity.Orange.GetRarityValue();
|
||||
item.value = Item.sellPrice(0, 0, 10);
|
||||
item.value = Item.buyPrice(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> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 50, new List<int> {ModContent.TileType<TitanForge>()});
|
||||
|
||||
|
||||
@ -20,12 +20,12 @@ namespace Decimation.Content.Items.Ammo
|
||||
item.knockBack = 2;
|
||||
item.width = 14;
|
||||
item.height = 32;
|
||||
item.value = Item.sellPrice(0, 0, 0, 55);
|
||||
item.value = Item.buyPrice(0, 0, 0, 55);
|
||||
|
||||
this.item.shootSpeed = 2.5f;
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.Anvils});
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 375 B |
@ -1,6 +1,5 @@
|
||||
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;
|
||||
@ -11,9 +10,9 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace Decimation.Content.Items.Ammo
|
||||
{
|
||||
internal class ScytheStyngerBolt : DecimationAmmo
|
||||
internal class TitanicStyngerBolt : DecimationAmmo
|
||||
{
|
||||
protected override string ItemName => "The Scythe Stynger Bolt";
|
||||
protected override string ItemName => "Titanic Stynger Bolt";
|
||||
protected override string ItemTooltip => "Explodes into deadly shrapnel.";
|
||||
protected override string Projectile => "TitanicStyngerBolt";
|
||||
protected override int Ammo => AmmoID.StyngerBolt;
|
||||
@ -25,7 +24,7 @@ namespace Decimation.Content.Items.Ammo
|
||||
item.rare = Rarity.Orange.GetRarityValue();
|
||||
item.width = 8;
|
||||
item.height = 8;
|
||||
item.value = Item.sellPrice(0, 0, 10);
|
||||
item.value = Item.buyPrice(0, 0, 10);
|
||||
item.consumable = true;
|
||||
|
||||
this.item.shootSpeed = 2f;
|
||||
@ -43,7 +42,7 @@ namespace Decimation.Content.Items.Ammo
|
||||
target.AddBuff(ModContent.BuffType<Amnesia>(), 600);
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 50, new List<int> {ModContent.TileType<TitanForge>()});
|
||||
|
||||
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
@ -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> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench}, true);
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ namespace Decimation.Content.Items.Amulets
|
||||
(int) (player.position.Y + player.height / 2f) / 16, 1, 1, 1);
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ namespace Decimation.Content.Items.Amulets
|
||||
player.magicCrit += 3;
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Decimation.Content.Buffs.Debuffs;
|
||||
using Decimation.Content.Items.Accessories;
|
||||
using Decimation.Content.Synergies;
|
||||
using Decimation.Lib.Amulets;
|
||||
using Decimation.Lib.Amulets.Synergy;
|
||||
using Decimation.Content.Items.Accessories;
|
||||
using Decimation.Content.Synergies;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@ -34,7 +34,7 @@ namespace Decimation.Content.Items.Amulets
|
||||
modPlayer.amuletsBuffTime = 300;
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||
|
||||
@ -53,10 +53,8 @@ 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 \"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");
|
||||
.AddEffect("+4% chances to inflict \"Slimed!\" debuff to ennemies on strikes")
|
||||
.AddSynergy("The lava charm grant an additional 5 seconds of lava immunity");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -22,7 +22,7 @@ namespace Decimation.Content.Items.Amulets
|
||||
player.rangedCrit += 3;
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ namespace Decimation.Content.Items.Amulets
|
||||
}
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ namespace Decimation.Content.Items.Amulets
|
||||
Item.NewItem(new Vector2(player.position.X, player.position.Y), ModContent.ItemType<EnchantedHeart>());
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ namespace Decimation.Content.Items.Amulets
|
||||
modPlayer.amuletsBuffWhenAttacking = true;
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench});
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ namespace Decimation.Content.Items.Amulets
|
||||
(int) (player.position.Y + player.height / 2f) / 16, 1, 1, 1);
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {TileID.TinkerersWorkbench}, true);
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ namespace Decimation.Content.Items.Amulets
|
||||
modPlayer.amuletsBuffTime = 300;
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> { TileID.TinkerersWorkbench }, true);
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ namespace Decimation.Content.Items.Armors.ScarabArmor
|
||||
player.noKnockback = true;
|
||||
}
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { ModContent.TileType<TitanForge>() }, false);
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ namespace Decimation.Content.Items.Armors.ScarabArmor
|
||||
}
|
||||
|
||||
|
||||
protected override List<ModRecipe> GetRecipes()
|
||||
protected override List<ModRecipe> GetAdditionalRecipes()
|
||||
{
|
||||
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int> {ModContent.TileType<TitanForge>()});
|
||||
|
||||
|
||||