Fixed Dune Wyrm dropping nothing
This commit is contained in:
parent
6d48fb7ef0
commit
c3fcc05859
@ -1,17 +1,21 @@
|
|||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Terraria.ID;
|
|
||||||
|
|
||||||
namespace Decimation.Content.Debug
|
namespace Decimation.Content.Debug
|
||||||
{
|
{
|
||||||
public class DebugSword : DecimationWeapon
|
public class DebugSword : DecimationWeapon
|
||||||
{
|
{
|
||||||
public override string Texture => "Terraria/Item_" + ItemID.TrueExcalibur;
|
|
||||||
protected override string ItemName => "Debug Sword";
|
protected override string ItemName => "Debug Sword";
|
||||||
protected override int Damages => 9999999;
|
protected override int Damages => 9999999;
|
||||||
|
|
||||||
protected override void InitWeapon()
|
protected override void InitWeapon()
|
||||||
{
|
{
|
||||||
item.CloneDefaults(ItemID.TrueExcalibur);
|
item.width = 168;
|
||||||
|
item.height = 168;
|
||||||
|
item.useTime = 30;
|
||||||
|
item.useAnimation = 30;
|
||||||
|
item.crit = 50;
|
||||||
|
item.autoReuse = false;
|
||||||
|
item.knockBack = 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIN
Content/Debug/DebugSword.png
Normal file
BIN
Content/Debug/DebugSword.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@ -1,45 +1,29 @@
|
|||||||
using Decimation.Content.Items.Accessories;
|
using Decimation.Content.Items.Accessories;
|
||||||
using Decimation.Content.Items.Weapons.Arachnus;
|
using Decimation.Content.Items.Weapons.Arachnus;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Items.Boss.Arachnus
|
namespace Decimation.Content.Items.Boss.Arachnus
|
||||||
{
|
{
|
||||||
internal class ArachnusTreasureBag : DecimationItem
|
internal class ArachnusTreasureBag : DecimationTreasureBag
|
||||||
{
|
{
|
||||||
protected override string ItemName => "Treasure Bag";
|
|
||||||
protected override string ItemTooltip => "{$CommonItemTooltip.RightClickToOpen}";
|
|
||||||
public override int BossBagNPC => ModContent.NPCType<NPCs.Arachnus.Arachnus>();
|
public override int BossBagNPC => ModContent.NPCType<NPCs.Arachnus.Arachnus>();
|
||||||
|
|
||||||
protected override void Init()
|
|
||||||
{
|
|
||||||
item.consumable = true;
|
|
||||||
item.width = 32;
|
|
||||||
item.height = 32;
|
|
||||||
item.rare = Rarity.Cyan.GetRarityValue();
|
|
||||||
|
|
||||||
this.item.expert = true;
|
|
||||||
this.item.maxStack = 999;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CanRightClick()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OpenBossBag(Player player)
|
public override void OpenBossBag(Player player)
|
||||||
{
|
{
|
||||||
player.TryGettingDevArmor();
|
switch (Main.rand.Next(3))
|
||||||
|
{
|
||||||
int rand = Main.rand.Next(3);
|
case 0:
|
||||||
if (rand == 0)
|
|
||||||
player.QuickSpawnItem(ModContent.ItemType<ChainStynger>());
|
player.QuickSpawnItem(ModContent.ItemType<ChainStynger>());
|
||||||
else if (rand == 1)
|
break;
|
||||||
|
case 1:
|
||||||
player.QuickSpawnItem(ModContent.ItemType<GlaiveWeaver>());
|
player.QuickSpawnItem(ModContent.ItemType<GlaiveWeaver>());
|
||||||
else if (rand == 2)
|
break;
|
||||||
|
case 2:
|
||||||
player.QuickSpawnItem(ModContent.ItemType<Infernolizer>());
|
player.QuickSpawnItem(ModContent.ItemType<Infernolizer>());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
player.QuickSpawnItem(ModContent.ItemType<ShinySentinel>());
|
player.QuickSpawnItem(ModContent.ItemType<ShinySentinel>());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,43 +3,22 @@ using Decimation.Content.Items.Misc;
|
|||||||
using Decimation.Content.Items.Weapons.Bloodshot;
|
using Decimation.Content.Items.Weapons.Bloodshot;
|
||||||
using Decimation.Content.NPCs.Bloodshot;
|
using Decimation.Content.NPCs.Bloodshot;
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Items.Boss.Bloodshot
|
namespace Decimation.Content.Items.Boss.Bloodshot
|
||||||
{
|
{
|
||||||
internal class TreasureBagBloodshotEye : DecimationItem
|
internal class BloodshotEyeTreasureBag : DecimationTreasureBag
|
||||||
{
|
{
|
||||||
protected override string ItemName => "Treasure Bag";
|
|
||||||
protected override string ItemTooltip => "{$CommonItemTooltip.RightClickToOpen}";
|
|
||||||
public override int BossBagNPC => ModContent.NPCType<BloodshotEye>();
|
public override int BossBagNPC => ModContent.NPCType<BloodshotEye>();
|
||||||
|
|
||||||
protected override void Init()
|
|
||||||
{
|
|
||||||
item.consumable = true;
|
|
||||||
item.width = 24;
|
|
||||||
item.height = 24;
|
|
||||||
item.rare = Rarity.Rainbow.GetRarityValue();
|
|
||||||
|
|
||||||
this.item.expert = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CanRightClick()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OpenBossBag(Player player)
|
public override void OpenBossBag(Player player)
|
||||||
{
|
{
|
||||||
player.QuickSpawnItem(ModContent.ItemType<BloodiedEssence>(), Main.rand.Next(35, 51));
|
player.QuickSpawnItem(ModContent.ItemType<BloodiedEssence>(), Main.rand.Next(35, 51));
|
||||||
player.QuickSpawnItem(ModContent.ItemType<NecrosisStone>());
|
player.QuickSpawnItem(ModContent.ItemType<NecrosisStone>());
|
||||||
|
|
||||||
int random = Main.rand.Next(3);
|
|
||||||
int weapon = 0;
|
int weapon = 0;
|
||||||
|
switch (Main.rand.Next(3))
|
||||||
switch (random)
|
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
weapon = ModContent.ItemType<VampiricShiv>();
|
weapon = ModContent.ItemType<VampiricShiv>();
|
||||||
@ -50,11 +29,6 @@ namespace Decimation.Content.Items.Boss.Bloodshot
|
|||||||
case 2:
|
case 2:
|
||||||
weapon = ModContent.ItemType<BloodStream>();
|
weapon = ModContent.ItemType<BloodStream>();
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
Main.NewText(
|
|
||||||
"Unexpected error in Bloodshot Eye drops: weapon drop random is out of range (" + random + ").",
|
|
||||||
Color.Red);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
player.QuickSpawnItem(weapon);
|
player.QuickSpawnItem(weapon);
|
||||||
|
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 506 B |
@ -2,41 +2,23 @@ using Decimation.Content.Items.Misc.Souls;
|
|||||||
using Decimation.Content.Items.Placeable.DuneWyrm;
|
using Decimation.Content.Items.Placeable.DuneWyrm;
|
||||||
using Decimation.Content.Items.Tools;
|
using Decimation.Content.Items.Tools;
|
||||||
using Decimation.Content.Items.Vanity.DuneWyrm;
|
using Decimation.Content.Items.Vanity.DuneWyrm;
|
||||||
using Decimation.Content.NPCs.DuneWyrm;
|
|
||||||
using Decimation.Lib.Items;
|
using Decimation.Lib.Items;
|
||||||
using Decimation.Lib.Util;
|
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Decimation.Content.Items.Boss.DuneWyrm
|
namespace Decimation.Content.Items.Boss.DuneWyrm
|
||||||
{
|
{
|
||||||
internal class DuneWyrmTreasureBag : DecimationItem
|
internal class DuneWyrmTreasureBag : DecimationTreasureBag
|
||||||
{
|
{
|
||||||
protected override string ItemName => "Treasure Bag";
|
public override int BossBagNPC => ModContent.NPCType<NPCs.DuneWyrm.DuneWyrmHead>();
|
||||||
protected override string ItemTooltip => "Right click to open";
|
|
||||||
public override int BossBagNPC => ModContent.NPCType<DuneWyrmHead>();
|
|
||||||
|
|
||||||
protected override void Init()
|
|
||||||
{
|
|
||||||
item.consumable = true;
|
|
||||||
item.width = 32;
|
|
||||||
item.height = 32;
|
|
||||||
item.rare = Rarity.Rainbow.GetRarityValue();
|
|
||||||
item.expert = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CanRightClick()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OpenBossBag(Player player)
|
public override void OpenBossBag(Player player)
|
||||||
{
|
{
|
||||||
player.QuickSpawnItem(ModContent.ItemType<SoulofTime>(), Main.rand.Next(20, 35));
|
player.QuickSpawnItem(ModContent.ItemType<SoulofTime>(), Main.rand.Next(20, 35));
|
||||||
player.QuickSpawnItem(ItemID.FossilOre, Main.rand.Next(10, 15));
|
player.QuickSpawnItem(ItemID.FossilOre, Main.rand.Next(10, 15));
|
||||||
player.QuickSpawnItem(ModContent.ItemType<TheHourGlass>());
|
player.QuickSpawnItem(ModContent.ItemType<TheHourGlass>());
|
||||||
if (Main.rand.Next(7) == 0)
|
if (Main.rand.NextBool(7))
|
||||||
player.QuickSpawnItem(ModContent.ItemType<DuneWyrmMask>());
|
player.QuickSpawnItem(ModContent.ItemType<DuneWyrmMask>());
|
||||||
if (Main.rand.NextBool(13))
|
if (Main.rand.NextBool(13))
|
||||||
player.QuickSpawnItem(ModContent.ItemType<DuneWyrmTrophy>());
|
player.QuickSpawnItem(ModContent.ItemType<DuneWyrmTrophy>());
|
||||||
|
|||||||
@ -49,7 +49,7 @@ namespace Decimation.Content.NPCs.Bloodshot
|
|||||||
npc.knockBackResist = 0;
|
npc.knockBackResist = 0;
|
||||||
npc.dontTakeDamage = true;
|
npc.dontTakeDamage = true;
|
||||||
music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Boss_1_Orchestra");
|
music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Boss_1_Orchestra");
|
||||||
bossBag = ModContent.ItemType<TreasureBagBloodshotEye>();
|
bossBag = ModContent.ItemType<BloodshotEyeTreasureBag>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AI()
|
public override void AI()
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Decimation.Content.Buffs.Debuffs;
|
using Decimation.Content.Buffs.Debuffs;
|
||||||
using Decimation.Content.Items.Boss.DuneWyrm;
|
using Decimation.Content.Items.Boss.DuneWyrm;
|
||||||
|
using Decimation.Content.Items.Misc.Souls;
|
||||||
|
using Decimation.Content.Items.Vanity.DuneWyrm;
|
||||||
using Decimation.Content.NPCs.DuneWyrm.AncientTombCrawler;
|
using Decimation.Content.NPCs.DuneWyrm.AncientTombCrawler;
|
||||||
using Decimation.Content.Projectiles;
|
using Decimation.Content.Projectiles;
|
||||||
using Decimation.Lib.NPCs;
|
using Decimation.Lib.NPCs;
|
||||||
@ -27,10 +29,11 @@ namespace Decimation.Content.NPCs.DuneWyrm
|
|||||||
npc.width = 116;
|
npc.width = 116;
|
||||||
npc.height = 116;
|
npc.height = 116;
|
||||||
Main.npcFrameCount[npc.type] = 1;
|
Main.npcFrameCount[npc.type] = 1;
|
||||||
npc.value = Item.buyPrice(gold: 12);
|
|
||||||
npc.npcSlots = 1f;
|
npc.npcSlots = 1f;
|
||||||
npc.aiStyle = -1;
|
npc.aiStyle = -1;
|
||||||
|
npc.boss = true;
|
||||||
music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/The_Deserts_Call");
|
music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/The_Deserts_Call");
|
||||||
|
bossBag = ModContent.ItemType<DuneWyrmTreasureBag>();
|
||||||
|
|
||||||
DuneWyrmBody.bodyPartsCount = 0;
|
DuneWyrmBody.bodyPartsCount = 0;
|
||||||
}
|
}
|
||||||
@ -53,6 +56,20 @@ namespace Decimation.Content.NPCs.DuneWyrm
|
|||||||
target.AddBuff(ModContent.BuffType<Hyperthermic>(), Main.expertMode ? 600 : 300);
|
target.AddBuff(ModContent.BuffType<Hyperthermic>(), Main.expertMode ? 600 : 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void NPCLoot()
|
||||||
|
{
|
||||||
|
if (!Main.expertMode)
|
||||||
|
{
|
||||||
|
Item.NewItem(npc.Center, ModContent.ItemType<SoulofTime>(), Main.rand.Next(15, 26));
|
||||||
|
|
||||||
|
if (Main.rand.NextBool(20)) Item.NewItem(npc.Center, ModContent.ItemType<DuneWyrmMask>());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
npc.DropBossBags();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void BossLoot(ref string name, ref int potionType)
|
public override void BossLoot(ref string name, ref int potionType)
|
||||||
{
|
{
|
||||||
name = "The Dune Wyrm";
|
name = "The Dune Wyrm";
|
||||||
@ -279,6 +296,7 @@ namespace Decimation.Content.NPCs.DuneWyrm
|
|||||||
headType = ModContent.NPCType<DuneWyrmHead>();
|
headType = ModContent.NPCType<DuneWyrmHead>();
|
||||||
speed = BaseSpeed;
|
speed = BaseSpeed;
|
||||||
turnSpeed = 0.045f;
|
turnSpeed = 0.045f;
|
||||||
|
npc.value = Item.buyPrice(gold: 16);
|
||||||
npc.scale = 1.5f;
|
npc.scale = 1.5f;
|
||||||
npc.lavaImmune = true;
|
npc.lavaImmune = true;
|
||||||
npc.noGravity = true;
|
npc.noGravity = true;
|
||||||
@ -288,8 +306,6 @@ namespace Decimation.Content.NPCs.DuneWyrm
|
|||||||
npc.netAlways = true;
|
npc.netAlways = true;
|
||||||
npc.DeathSound = SoundID.NPCDeath18;
|
npc.DeathSound = SoundID.NPCDeath18;
|
||||||
npc.HitSound = SoundID.NPCHit1;
|
npc.HitSound = SoundID.NPCHit1;
|
||||||
npc.boss = true;
|
|
||||||
bossBag = ModContent.ItemType<DuneWyrmTreasureBag>();
|
|
||||||
undergroundSound = mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/Earthquake");
|
undergroundSound = mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/Earthquake");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
30
Lib/Items/DecimationTreasureBag.cs
Normal file
30
Lib/Items/DecimationTreasureBag.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Terraria;
|
||||||
|
|
||||||
|
namespace Decimation.Lib.Items
|
||||||
|
{
|
||||||
|
public abstract class DecimationTreasureBag : DecimationItem
|
||||||
|
{
|
||||||
|
protected sealed override string ItemName => "Treasure Bag";
|
||||||
|
protected sealed override string ItemTooltip => "{$CommonItemTooltip.RightClickToOpen}";
|
||||||
|
|
||||||
|
public abstract override int BossBagNPC { get; }
|
||||||
|
|
||||||
|
protected sealed override void Init()
|
||||||
|
{
|
||||||
|
item.consumable = true;
|
||||||
|
item.width = 32;
|
||||||
|
item.height = 32;
|
||||||
|
item.rare = Rarity.Rainbow.GetRarityValue();
|
||||||
|
item.expert = true;
|
||||||
|
item.maxStack = 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed override bool CanRightClick()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract override void OpenBossBag(Player player);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user