This commit is contained in:
Andrew Marheine committed 2020-05-03 08:34:49 -05:00
commit 6317f2991e
14 files changed
+21 -17

No files matched your search

+3 -2
View File
@@ -9292,12 +9292,13 @@ namespace CalamityMod.CalPlayer
// Using any item which deals no damage or is a tool doesn't consume stealth.
Item it = player.HeldItem;
bool hasDamage = it.damage > 0;
bool hasHitboxes = !it.noMelee || it.shoot > 0;
bool isPickaxe = it.pick > 0;
bool isAxe = it.axe > 0;
bool isHammer = it.hammer > 0;
bool isPlaced = it.createTile != 0;
bool producesNoHitboxes = it.shoot == 0 && it.useStyle == ItemUseStyleID.SwingThrow && it.noMelee;
bool playerUsingWeapon = hasDamage && !(isPickaxe || isAxe || isHammer || isPlaced || producesNoHitboxes);
bool hasNonWeaponFunction = isPickaxe || isAxe || isHammer || isPlaced;
bool playerUsingWeapon = hasDamage && hasHitboxes && !hasNonWeaponFunction;
if (!stealthStrikeThisFrame && player.itemAnimation == player.itemAnimationMax - 1 && playerUsingWeapon)
ConsumeStealthByAttacking();
}
+1 -1
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Dyes
public override void SafeSetDefaults()
{
item.rare = 9;
item.value = CalamityGlobalItem.Rarity9BuyPrice;
item.value = Item.sellPrice(0, 2, 0, 0);
}
public override void AddRecipes()
+1 -1
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Dyes
public override void SafeSetDefaults()
{
item.rare = 9;
item.value = CalamityGlobalItem.Rarity9BuyPrice;
item.value = Item.sellPrice(0, 2, 0, 0);
}
public override void AddRecipes()
+1 -1
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Dyes
public override void SafeSetDefaults()
{
item.rare = 9;
item.value = CalamityGlobalItem.Rarity9BuyPrice;
item.value = Item.sellPrice(0, 3, 0, 0);
}
public override void AddRecipes()
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Dyes
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.PureGreen;
item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
item.value = Item.sellPrice(0, 4, 0, 0);
}
public override void AddRecipes()
+1 -1
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Dyes
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.Violet;
item.value = CalamityGlobalItem.RarityVioletBuyPrice;
item.value = Item.sellPrice(0, 8, 0, 0);
}
public override void AddRecipes()
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Dyes
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.Turquoise;
item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
item.value = Item.sellPrice(0, 2, 50, 0);
}
public override void AddRecipes()
+1 -1
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Dyes
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.DarkBlue;
item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
item.value = Item.sellPrice(0, 5, 0, 0);
}
public override void AddRecipes()
+1 -1
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Dyes
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.DarkBlue;
item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
item.value = Item.sellPrice(0, 5, 0, 0);
}
public override void AddRecipes()
+1 -1
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Dyes
public override void SafeSetDefaults()
{
item.rare = 7;
item.value = CalamityGlobalItem.Rarity7BuyPrice;
item.value = Item.sellPrice(0, 1, 0, 0);
}
public override void AddRecipes()
+1 -1
View File
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Dyes
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.Developer;
item.value = CalamityGlobalItem.RarityHotPinkBuyPrice;
item.value = Item.sellPrice(0, 10, 0, 0);
}
public override void AddRecipes()
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Dyes
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.PureGreen;
item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
item.value = Item.sellPrice(0, 4, 50, 0);
}
public override void AddRecipes()
+7
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.SummonItems;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -98,6 +99,12 @@ namespace CalamityMod.NPCs.AcidRain
Dust.NewDust(npc.position, npc.width, npc.height, DustID.Blood, hitDirection, -1f, 0, default, 1f);
}
}
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
return (spawnInfo.player.Calamity().ZoneSulphur && CalamityWorld.downedPolterghast && !CalamityWorld.rainingAcid) ? SpawnCondition.WormCritter.Chance * 1.569f : 0f;
}
public override void OnCatchNPC(Player player, Item item)
{
try
-4
View File
@@ -4115,10 +4115,6 @@ namespace CalamityMod.NPCs
}
}
}
if (CalamityWorld.downedPolterghast)
{
pool.Add(NPCType<BloodwormNormal>(), AcidRainEvent.BloodwormSpawnRate);
}
}
}
}