Merge branch '1.4.4' into SunkenSeaTileOddities
This commit is contained in:
commit
1b372d84b4
80 files changed
+203
-211
No files matched your search
@@ -286,17 +286,25 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (attempt.legendary)
|
||||
{
|
||||
List<int> legendaryCatches = new List<int>()
|
||||
{
|
||||
List<int> legendaryCatches =
|
||||
[
|
||||
ModContent.ItemType<RustedJingleBell>()
|
||||
};
|
||||
legendaryCatches.AddWithCondition<int>(ModContent.ItemType<SparklingEmpress>(), DownedBossSystem.downedDesertScourge);
|
||||
legendaryCatches.AddWithCondition<int>(ModContent.ItemType<SeaSpiritAmulet>(), DownedBossSystem.downedDesertScourge);
|
||||
];
|
||||
|
||||
legendaryCatches.AddWithCondition<int>(ModContent.ItemType<SerpentsBite>(), Main.hardMode);
|
||||
itemDrop = legendaryCatches[Main.rand.Next(legendaryCatches.Count)];
|
||||
}
|
||||
else if (attempt.veryrare)
|
||||
itemDrop = ModContent.ItemType<GreenwaveLoach>();
|
||||
{
|
||||
List<int> veryRareCatches =
|
||||
[
|
||||
ModContent.ItemType<GreenwaveLoach>()
|
||||
];
|
||||
|
||||
veryRareCatches.AddWithCondition<int>(ModContent.ItemType<SparklingEmpress>(), DownedBossSystem.downedDesertScourge);
|
||||
veryRareCatches.AddWithCondition<int>(ModContent.ItemType<SeaSpiritAmulet>(), DownedBossSystem.downedDesertScourge);
|
||||
itemDrop = veryRareCatches[Main.rand.Next(veryRareCatches.Count)];
|
||||
}
|
||||
// Quest fish hover around this priority
|
||||
else if (questFish == ModContent.ItemType<EutrophicSandfish>() && attempt.uncommon)
|
||||
itemDrop = ModContent.ItemType<EutrophicSandfish>();
|
||||
|
||||
@@ -1805,7 +1805,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
handler.OnCompleted();
|
||||
if (handler.EndSound != null && handler.ShouldPlayEndSound)
|
||||
SoundEngine.PlaySound(handler.EndSound.GetValueOrDefault());
|
||||
SoundEngine.PlaySound(handler.EndSound.GetValueOrDefault(), Player.Center);
|
||||
expiredCooldowns.Add(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 30;
|
||||
Item.height = 28;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 30;
|
||||
Item.height = 28;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.value = Item.sellPrice(silver: 75);
|
||||
Item.vanity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace CalamityMod.Items.Materials
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
ItemID.Sets.SortingPriorityMaterials[Type] = 110;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ectoplasm;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
using Terraria.ID;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(4).
|
||||
CreateRecipe().
|
||||
AddIngredient<Driftwood>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Potions.Food
|
||||
new Color(160, 32, 95)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,8 @@ namespace CalamityMod.Items.Potions.Food
|
||||
new Color(147, 200, 221)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,8 @@ namespace CalamityMod.Items.Potions.Food
|
||||
new Color(147, 176, 54)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,8 @@ namespace CalamityMod.Items.Potions.Food
|
||||
new Color(233, 184, 87)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,8 @@ namespace CalamityMod.Items.Potions.Food
|
||||
new Color(123, 99, 130)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,8 @@ namespace CalamityMod.Items.Potions.Food
|
||||
new Color(253, 242, 233)
|
||||
};
|
||||
ItemID.Sets.IsFood[Type] = true;
|
||||
}
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Ambrosia;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -28,4 +29,4 @@ namespace CalamityMod.Items.Potions.Food
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,12 +53,11 @@ namespace CalamityMod.Items.TreasureBags.MiscGrabBags
|
||||
itemLoot.Add(ItemID.Rope, 1, 50, 50);
|
||||
|
||||
// Potions
|
||||
itemLoot.Add(ItemID.MiningPotion);
|
||||
itemLoot.Add(ItemID.SpelunkerPotion, 1, 2, 2);
|
||||
itemLoot.Add(ItemID.SwiftnessPotion, 1, 3, 3);
|
||||
itemLoot.Add(ItemID.GillsPotion, 1, 2, 2);
|
||||
itemLoot.Add(ItemID.ShinePotion);
|
||||
LeadingConditionRule multiplayer = itemLoot.DefineConditionalDropSet(() => Main.netMode == NetmodeID.MultiplayerClient);
|
||||
itemLoot.Add(ItemID.MiningPotion, 1, 3, 3);
|
||||
itemLoot.Add(ItemID.SpelunkerPotion, 1, 3, 3);
|
||||
itemLoot.Add(ItemID.RecallPotion, 1, 3, 3);
|
||||
multiplayer.Add(ItemID.WormholePotion, 1, 3, 3);
|
||||
|
||||
// Tiles
|
||||
itemLoot.Add(ItemID.Torch, 1, 25, 25);
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
Item.width = 40;
|
||||
Item.height = 42;
|
||||
Item.damage = 415;
|
||||
Item.damage = 515;
|
||||
Item.knockBack = 4f;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 6;
|
||||
|
||||
@@ -23,9 +23,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 10;
|
||||
Item.useAnimation = 8;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTime = 10;
|
||||
Item.useTime = 8;
|
||||
Item.knockBack = 3f;
|
||||
Item.UseSound = SoundID.Item39;
|
||||
Item.autoReuse = true;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 94;
|
||||
Item.height = 34;
|
||||
Item.damage = 400;
|
||||
Item.damage = 488;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useAnimation = Item.useTime = 5;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 60;
|
||||
Item.height = 26;
|
||||
Item.damage = 200;
|
||||
Item.damage = 222;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = 1;
|
||||
Item.useAnimation = 3;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 58;
|
||||
Item.height = 56;
|
||||
Item.damage = 18;
|
||||
Item.damage = 19;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.useAnimation = Item.useTime = 28;
|
||||
Item.knockBack = 2f;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 10;
|
||||
Item.height = 26;
|
||||
Item.damage = 9;
|
||||
Item.damage = 13;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.useAnimation = Item.useTime = 17;
|
||||
Item.knockBack = 1.5f;
|
||||
@@ -41,15 +41,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
newVel = velocity.RotatedByRandom(MathHelper.ToRadians(23f));
|
||||
int stealth = Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI);
|
||||
if (stealth.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
}
|
||||
int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
Main.projectile[proj].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -309,21 +309,21 @@ namespace CalamityMod.NPCs
|
||||
|
||||
#region Aquatic / Ocean
|
||||
// Pink Jellyfish
|
||||
// Life Jelly @ 14.29% Normal, 25% Expert+
|
||||
// Life Jelly @ 10% Normal, 14.29% Expert+
|
||||
case NPCID.PinkJellyfish:
|
||||
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<LifeJelly>(), 7, 4));
|
||||
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<LifeJelly>(), 10, 7));
|
||||
break;
|
||||
|
||||
// Blue Jellyfish
|
||||
// Cleansing Jelly @ 14.29% Normal, 25% Expert+
|
||||
// Cleansing Jelly @ 10% Normal, 14.29% Expert+
|
||||
case NPCID.BlueJellyfish:
|
||||
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<CleansingJelly>(), 7, 4));
|
||||
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<CleansingJelly>(), 10, 7));
|
||||
break;
|
||||
|
||||
// Green Jellyfish
|
||||
// Vital Jelly @ 14.29% Normal, 25% Expert+
|
||||
// Vital Jelly @ 12.5% Normal, 20% Expert+
|
||||
case NPCID.GreenJellyfish:
|
||||
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<VitalJelly>(), 7, 4));
|
||||
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<VitalJelly>(), 8, 5));
|
||||
break;
|
||||
|
||||
// Shark
|
||||
@@ -509,7 +509,7 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.MaggotZombie:
|
||||
case NPCID.TheBride:
|
||||
case NPCID.TheGroom:
|
||||
npcLoot.Add(ModContent.ItemType<BloodOrb>(), 10);
|
||||
postEoC.Add(ModContent.ItemType<BloodOrb>(), 10);
|
||||
break;
|
||||
|
||||
// Ghost Bracelet @ 5% (Dandy requests this drops at a "high chance" but inventory clutter is real so)
|
||||
@@ -519,13 +519,15 @@ namespace CalamityMod.NPCs
|
||||
#endregion
|
||||
|
||||
#region Blood Moon
|
||||
// All Blood Moon enemies
|
||||
// After EoC, All Blood Moon enemies
|
||||
// Drop Blood Orbs @ 100% (25% for common enemies)
|
||||
case NPCID.BloodZombie:
|
||||
case NPCID.Drippler:
|
||||
npcLoot.Add(ModContent.ItemType<BloodOrb>(), 4);
|
||||
postEoC.Add(ModContent.ItemType<BloodOrb>(), 4);
|
||||
break;
|
||||
|
||||
|
||||
//Hardmode enemies drop orbs even if EoC is not dead
|
||||
//99% of players will not encounter this and challenge runners will appreciate it
|
||||
case NPCID.Clown:
|
||||
npcLoot.Add(ModContent.ItemType<BloodOrb>(), 1, 6, 12);
|
||||
break;
|
||||
@@ -534,11 +536,11 @@ namespace CalamityMod.NPCs
|
||||
// Bouncing Eyeball @ 10% Normal, 16.66% Expert+
|
||||
case NPCID.EyeballFlyingFish:
|
||||
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<BouncingEyeball>(), 10, 6));
|
||||
npcLoot.Add(ModContent.ItemType<BloodOrb>(), 1, 10, 12);
|
||||
postEoC.Add(ModContent.ItemType<BloodOrb>(), 1, 10, 12);
|
||||
break;
|
||||
|
||||
case NPCID.ZombieMerman:
|
||||
npcLoot.Add(ModContent.ItemType<BloodOrb>(), 1, 10, 12);
|
||||
postEoC.Add(ModContent.ItemType<BloodOrb>(), 1, 10, 12);
|
||||
break;
|
||||
|
||||
case NPCID.GoblinShark:
|
||||
|
||||
@@ -7900,6 +7900,7 @@ PrepareToShoot:
|
||||
npc.velocity.Y -= 6f;
|
||||
}
|
||||
}
|
||||
|
||||
else if (npc.type == NPCID.Tumbleweed && npc.velocity.Y == 0f && Math.Abs(npc.velocity.X) > 3f && ((npc.Center.X < Main.player[npc.target].Center.X && npc.velocity.X > 0f) || (npc.Center.X > Main.player[npc.target].Center.X && npc.velocity.X < 0f)))
|
||||
{
|
||||
npc.velocity.Y -= 6f;
|
||||
@@ -7956,7 +7957,11 @@ PrepareToShoot:
|
||||
|
||||
if (!flag && (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction < 0) || (npc.velocity.X >= 0f && npc.direction > 0)))
|
||||
{
|
||||
if (npc.type == NPCID.Wolf || npc.type == ModContent.NPCType<Rotdog>())
|
||||
if (npc.type == ModContent.NPCType<Rotdog>())
|
||||
{
|
||||
npc.velocity.X *= 0.99f;
|
||||
}
|
||||
if (npc.type == NPCID.Wolf)
|
||||
{
|
||||
if (npc.velocity.X > 0f && npc.direction < 0)
|
||||
{
|
||||
@@ -7971,11 +7976,11 @@ PrepareToShoot:
|
||||
{
|
||||
if (npc.velocity.X > 0f && npc.direction < 0)
|
||||
{
|
||||
npc.velocity.X *= 0.8f;
|
||||
npc.velocity.X *= 0.2f;
|
||||
}
|
||||
if (npc.velocity.X < 0f && npc.direction > 0)
|
||||
{
|
||||
npc.velocity.X *= 0.8f;
|
||||
npc.velocity.X *= 0.2f;
|
||||
}
|
||||
if (npc.direction > 0 && npc.velocity.X < 3f)
|
||||
{
|
||||
|
||||
@@ -113,10 +113,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true);
|
||||
modifiers.SourceDamage *= damageMult * (frigidFlash ? 0.5f : 1); // Frigidflash explosion are spawned at full power, so their damage is reduced here
|
||||
|
||||
if (target.CanBeMoved(false)) // The vortex sucks in enemies
|
||||
{
|
||||
target.velocity = (-pushVelocity);
|
||||
}
|
||||
// The vortex sucks in enemies
|
||||
target.MoveNPC(-pushVelocity, customKnockback, frigidFlash);
|
||||
}
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
|
||||
@@ -102,12 +102,9 @@ namespace CalamityMod.Projectiles.Magic
|
||||
modifiers.SourceDamage *= (launched ? 1f : 0.4f);
|
||||
|
||||
Player Owner = Main.player[Projectile.owner];
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Custom knockback
|
||||
Vector2 launchVel = (Owner.Center - target.Center).SafeNormalize(Vector2.UnitY) * -10 * (launched ? 0.5f : 1);
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
|
||||
Vector2 launchVel = (Owner.Center - target.Center).SafeNormalize(Vector2.UnitY) * -10 * (launched ? 0.5f : 1);
|
||||
target.MoveNPC(launchVel, 10 * (launched ? 0.5f : 1), true);
|
||||
}
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
|
||||
@@ -104,12 +104,10 @@ namespace CalamityMod.Projectiles.Magic
|
||||
modifiers.SourceDamage *= (launched ? 1f : 0.4f);
|
||||
|
||||
Player Owner = Main.player[Projectile.owner];
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Custom knockback
|
||||
Vector2 launchVel = (Owner.Center - target.Center).SafeNormalize(Vector2.UnitY) * -10 * (launched ? 0.5f : 1);
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center);
|
||||
target.MoveNPC(launchVel, 10 * (launched ? 0.5f : 1), true);
|
||||
|
||||
}
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
// 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction
|
||||
Vector2 launchVel = (owner.Calamity().mouseWorld - owner.Center).SafeNormalize(Vector2.UnitY) * SHPC.MightKnockbackStrength - new Vector2(0, 3);
|
||||
target.velocity = launchVel;
|
||||
target.MoveNPC(launchVel, SHPC.MightKnockbackStrength, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
// 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction
|
||||
Player owner = Main.player[Projectile.owner];
|
||||
Vector2 launchVel = (owner.Calamity().mouseWorld - owner.Center).SafeNormalize(Vector2.UnitY) * SHPC.MightKnockbackStrength - new Vector2(0, 3);
|
||||
target.velocity = launchVel;
|
||||
|
||||
target.MoveNPC(launchVel, SHPC.MightKnockbackStrength, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
mousePos = Owner.Calamity().mouseWorld;
|
||||
}
|
||||
|
||||
if (CanHit)
|
||||
if (CanHit && Owner.Calamity().mouseRight)
|
||||
fadeIn = MathHelper.Lerp(fadeIn, 1, 0.1f);
|
||||
else
|
||||
fadeIn = MathHelper.Lerp(fadeIn, 0, 0.15f);
|
||||
@@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
CanHit = true;
|
||||
|
||||
Vector2 particleVel = new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45));
|
||||
Vector2 particleVel = new Vector2(0, 7 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45));
|
||||
Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(10, 90), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)));
|
||||
|
||||
Dust dust = Dust.NewDustPerfect(particlePos, 79);
|
||||
@@ -162,11 +162,13 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
if (CanHit)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
for (int i = 0; i < (Owner.Calamity().mouseRight ? 3 : 2); i++)
|
||||
{
|
||||
Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(90, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.JungleTorch, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 0.5f));
|
||||
dust2.scale = Main.rand.NextFloat(0.55f, 0.85f);
|
||||
dust2.noGravity = true;
|
||||
Vector2 dustPos = Owner.Center + (new Vector2(90, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f));
|
||||
Dust dust2 = Dust.NewDustPerfect(dustPos, i == 2 ? 278 : DustID.JungleTorch, Utils.DirectionTo(Owner.Center, dustPos) * Main.rand.NextFloat(1.2f, 2.5f));
|
||||
dust2.scale = Main.rand.NextFloat(0.55f, 0.85f) * (Owner.Calamity().mouseRight ? 1.3f : 1);
|
||||
dust2.noGravity = i == 2 ? false : true;
|
||||
dust2.color = i == 2 ? Color.Chartreuse : default;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,22 +189,22 @@ namespace CalamityMod.Projectiles.Melee
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 300);
|
||||
target.AddBuff(BuffID.Poisoned, 90);
|
||||
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction
|
||||
// Launch
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -12;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 7.5f * (Owner.Calamity().mouseRight ? 2.5f : 1), true);
|
||||
|
||||
if (Owner.Calamity().mouseRight)
|
||||
{
|
||||
Owner.Calamity().GeneralScreenShakePower = 1.2f;
|
||||
|
||||
SoundStyle fire3 = new("CalamityMod/Sounds/Item/HolyFireBulletExplosion");
|
||||
SoundEngine.PlaySound(fire3 with { Volume = 0.35f, Pitch = 0.7f }, Projectile.Center);
|
||||
for (int i = 0; i < MathHelper.Clamp(15 - Projectile.numHits * 3, 2, 15); i++)
|
||||
{
|
||||
Dust dust2 = Dust.NewDustPerfect(target.Center, DustID.JungleTorch, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(3.5f, 7f));
|
||||
dust2.scale = Main.rand.NextFloat(0.65f, 1.35f);
|
||||
bool dType = i % 4 == 0;
|
||||
Dust dust2 = Dust.NewDustPerfect(target.Center, dType ? 278 : DustID.JungleTorch, launchVel.RotatedByRandom(0.5f) * Main.rand.NextFloat(3.5f, 7f) * (dType ? 2 : 1));
|
||||
dust2.scale = Main.rand.NextFloat(0.65f, 1.35f) * (dType ? 0.7f : 1f);
|
||||
dust2.noGravity = true;
|
||||
dust2.color = dType ? Color.Chartreuse : default;
|
||||
}
|
||||
// 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction
|
||||
Vector2 playerLaunchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * 10;
|
||||
@@ -232,6 +234,13 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
float r = FlipAsSword ? MathHelper.ToRadians(90) : 0f;
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Color auraColor = Color.Chartreuse with { A = 0 } * 0.35f * fadeIn;
|
||||
Vector2 drawOffset = (MathHelper.TwoPi * i / 8f).ToRotationVector2() * 8 * fadeIn;
|
||||
Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), auraColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None));
|
||||
}
|
||||
|
||||
Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), lightColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None));
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -204,12 +204,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
SoundStyle fire2 = new("CalamityMod/Sounds/Item/MagicRockSound");
|
||||
SoundEngine.PlaySound(fire2 with { Volume = 0.55f, Pitch = 0.7f }, Projectile.Center);
|
||||
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Launch
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -11;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 11, true);
|
||||
|
||||
for (int i = 0; i < MathHelper.Clamp(6 - Projectile.numHits * 2, 2, 6); i++)
|
||||
{
|
||||
|
||||
@@ -126,12 +126,9 @@ namespace CalamityMod.Projectiles.Melee
|
||||
GeneralParticleHandler.SpawnParticle(orb2);
|
||||
}
|
||||
}
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Launch
|
||||
Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center).SafeNormalize(Vector2.UnitY) * -20;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
|
||||
Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center);
|
||||
target.MoveNPC(launchVel, 20, true);
|
||||
}
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 45 * sizeMult * (Projectile.numHits > 0 ? 6 : 1), targetHitbox);
|
||||
|
||||
@@ -257,12 +257,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if ((damageDone <= 2 || (target.life <= 0 && target.realLife == -1)) && Projectile.numHits > 0)
|
||||
Projectile.numHits -= 1;
|
||||
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Launch
|
||||
Vector2 launchVel = (Projectile.ai[1] != 1 ? Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld) : Utils.DirectionTo(Owner.Center, target.Center)) * 37;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
Vector2 launchVel = (Projectile.ai[1] != 1 ? Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld) : Utils.DirectionTo(Owner.Center, target.Center));
|
||||
target.MoveNPC(launchVel, 37, true);
|
||||
|
||||
if (spawnBoom)
|
||||
{
|
||||
@@ -301,8 +297,9 @@ namespace CalamityMod.Projectiles.Melee
|
||||
spawnBoom = false;
|
||||
}
|
||||
|
||||
int heal = (int)(MathHelper.Clamp(85 - Projectile.numHits * 65, 1, 85));
|
||||
if (Projectile.numHits < 15)
|
||||
int healPower = (Projectile.ai[1] == -1 ? 100 : 85);
|
||||
int heal = (int)(MathHelper.Clamp(healPower - Projectile.numHits * 75, 1, healPower));
|
||||
if (Projectile.numHits < 10)
|
||||
{
|
||||
Owner.HealPlayer(heal);
|
||||
}
|
||||
|
||||
@@ -242,8 +242,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
target.noTileCollide = false;
|
||||
|
||||
// Launch the suckers
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * (Main.zenithWorld ? -50 : -30) * (rightClicked ? 2 : 1);
|
||||
target.velocity = launchVel * 0.5f;
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, (Main.zenithWorld ? 50 : 30) * (rightClicked ? 2 : 1), true);
|
||||
|
||||
// Remove knockback resist, just like it used to
|
||||
target.knockBackResist = 1;
|
||||
|
||||
@@ -193,12 +193,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if ((damageDone <= 2 || (target.life <= 0 && target.realLife == -1)) && Projectile.numHits > 0)
|
||||
Projectile.numHits -= 1;
|
||||
|
||||
if (target.CanBeMoved(false))
|
||||
{
|
||||
// Launch
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -8;
|
||||
target.velocity = launchVel;
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 8, true);
|
||||
|
||||
if (spawnBoom)
|
||||
{
|
||||
|
||||
@@ -411,12 +411,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
}
|
||||
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Custom knockback
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * (chargedSwing ? -24 : -19);
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, (chargedSwing ? 24 : 19), true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
|
||||
@@ -346,8 +346,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile projectile = Main.projectile[x];
|
||||
if (Vector2.Distance(Owner.Center + (new Vector2(100, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 100 && projectile.active && projectile.type == ModContent.ProjectileType<HolyColliderHolyFire>() && projectile.ai[0] != 10)
|
||||
{
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -2.5f;
|
||||
projectile.velocity += launchVel;
|
||||
Vector2 launch = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -2.5f;
|
||||
projectile.velocity += launch;
|
||||
projectile.timeLeft = 300;
|
||||
projectile.owner = Owner.whoAmI;
|
||||
Particle orb2 = new CustomPulse(projectile.Center, Vector2.Zero, Color.Goldenrod, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.8f, 11);
|
||||
@@ -415,12 +415,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
}
|
||||
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Custom knockback
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * (chargedSwing ? -35 : -23);
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.3f : 1f);
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, (chargedSwing ? 35 : 23), true);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
|
||||
@@ -192,12 +192,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Owner.HealPlayer(heal);
|
||||
}
|
||||
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Launch
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -15;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 15, true);
|
||||
|
||||
for (int i = 0; i < MathHelper.Clamp(6 - Projectile.numHits * 2, 2, 6); i++)
|
||||
{
|
||||
|
||||
@@ -297,12 +297,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
SoundStyle fire2 = new("CalamityMod/Sounds/Custom/DefenseDamage");
|
||||
SoundEngine.PlaySound(fire2 with { Volume = 0.65f, Pitch = 0.4f }, Projectile.Center);
|
||||
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Launch
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -23;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 23, true);
|
||||
|
||||
target.AddBuff(BuffID.Electrified, 230);
|
||||
}
|
||||
|
||||
@@ -200,12 +200,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
SoundStyle fire2 = new("CalamityMod/Sounds/Item/MagicRockSound");
|
||||
SoundEngine.PlaySound(fire2 with { Volume = 0.55f, Pitch = 0.6f }, Projectile.Center);
|
||||
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Launch
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -17;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 17, true);
|
||||
|
||||
for (int i = 0; i < MathHelper.Clamp(10 - Projectile.numHits * 2, 2, 10); i++)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public static readonly SoundStyle SmashSoundGFB = new("CalamityMod/Sounds/Item/TF2PanHit");
|
||||
|
||||
public static float ExplosionDamageKBMult = 2f;
|
||||
public static float SuperHammerDamageMult = 4f;
|
||||
public static float SuperHammerDamageMult = 3f;
|
||||
public static float SmashHomingRange = 800f; // 50 tiles
|
||||
public static float WindUpTime = 216f; // 1.2 seconds
|
||||
public static float ConvergeTime = 18f; // 0.1 seconds
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
baseVel = Projectile.velocity;
|
||||
if (Svant)
|
||||
Projectile.ArmorPenetration = 100;
|
||||
Projectile.ArmorPenetration = 200;
|
||||
if (Infinity)
|
||||
Projectile.ArmorPenetration = 25;
|
||||
}
|
||||
|
||||
@@ -82,12 +82,10 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
Player Owner = Main.player[Projectile.owner];
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Launch
|
||||
Vector2 launchVel = (Projectile.Center - target.Center).SafeNormalize(Vector2.UnitY) * -17;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
|
||||
// Launch
|
||||
Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center);
|
||||
target.MoveNPC(launchVel, 6, true);
|
||||
}
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
|
||||
@@ -68,13 +68,9 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/NullImpact");
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.5f, Pitch = 0.5f }, Projectile.Center);
|
||||
}
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// 15NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction
|
||||
// Custom knockback
|
||||
Vector2 launchVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -20;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 20, true);
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
@@ -331,11 +331,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Vector2 launchDir = Utils.DirectionTo(Projectile.Center, target.Center);
|
||||
float launchPower = ((hasReachedFullCharge ? 9 : 0) + charge * 1.5f) * finalHitMult;
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Custom knockback
|
||||
target.velocity = launchDir * launchPower * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
|
||||
target.MoveNPC(launchDir, launchPower, true);
|
||||
|
||||
float extraPitch = (Owner.Calamity().rogueStealthMax > 0 ? (0.25f * (Owner.Calamity().rogueStealth / Owner.Calamity().rogueStealthMax)) : 0);
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
|
||||
}
|
||||
if (currentFrame < 13)
|
||||
if (currentFrame < 13) // suck in enemies, or you if it's GFB
|
||||
{
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
@@ -183,7 +183,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (target.CanBeMoved(true) && target.CanBeChasedBy(Projectile, false))
|
||||
{
|
||||
if (Vector2.Distance(target.Center, Projectile.Center) > 40 && Vector2.Distance(target.Center, Projectile.Center) < 600)
|
||||
{
|
||||
target.Center += target.Center.DirectionTo(Projectile.Center).SafeNormalize(Vector2.UnitX) * 22;
|
||||
target.SyncMotionToServer();
|
||||
}
|
||||
}
|
||||
else if (target != null && CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
@@ -226,11 +229,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
if (!target.boss && target.IsAnEnemy(true, true) && !CalamityPlayer.areThereAnyDamnBosses && target.CanBeChasedBy(Projectile, false) && target != null)
|
||||
{
|
||||
Vector2 velToApply = target.Center.DirectionFrom(Projectile.Center).SafeNormalize(Vector2.UnitX) * 30;
|
||||
target.velocity = velToApply + (velToApply.Y <= 0 ? new Vector2(0, -5) : Vector2.Zero);
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center);
|
||||
target.MoveNPC(launchVel, 30, true);
|
||||
|
||||
target.AddBuff(ModContent.BuffType<MiracleBlight>(), 90);
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
|
||||
@@ -227,7 +227,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
|
||||
}
|
||||
if (time < 80)
|
||||
if (time < 80) // Suck in enemies
|
||||
{
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
@@ -238,6 +238,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Vector2.Distance(target.Center, Projectile.Center) > 40 && Vector2.Distance(target.Center, Projectile.Center) < 2000)
|
||||
target.Center += target.Center.DirectionTo(Projectile.Center).SafeNormalize(Vector2.UnitX) * 38;
|
||||
target.SyncMotionToServer();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,11 +294,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
dust2.color = Color.Lerp(Color.White, randomColor, 0.9f);
|
||||
}
|
||||
|
||||
if (!target.boss && target.IsAnEnemy(true, true) && !CalamityPlayer.areThereAnyDamnBosses && target.CanBeChasedBy(Projectile, false) && target != null)
|
||||
{
|
||||
Vector2 velToApply = target.Center.DirectionFrom(Projectile.Center).SafeNormalize(Vector2.UnitX) * 40;
|
||||
target.velocity = velToApply + (velToApply.Y <= 0 ? new Vector2(0, -5) : Vector2.Zero);
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center);
|
||||
target.MoveNPC(launchVel, 60, true);
|
||||
}
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) // Add to regular plz
|
||||
|
||||
@@ -68,12 +68,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
target.AddBuff(BuffID.Wet, 300);
|
||||
target.AddBuff(ModContent.BuffType<RiptideDebuff>(), 300);
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Launch
|
||||
Vector2 launchVel = (Projectile.Center - target.Center).SafeNormalize(Vector2.UnitY) * -6;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
|
||||
Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center);
|
||||
target.MoveNPC(launchVel, 6, true);
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
@@ -209,12 +209,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
float damageMult = MinionBuffMode ? 2f : 1;
|
||||
modifiers.SourceDamage *= damageMult;
|
||||
|
||||
if (target.CanBeMoved(false))
|
||||
{
|
||||
// Custom knockback
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center) * (MinionBuffMode ? 5f : 0.5f);
|
||||
target.velocity = launchVel;
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center);
|
||||
target.MoveNPC(launchVel, (MinionBuffMode ? 5f : 0.5f), false);
|
||||
}
|
||||
public override bool MinionContactDamage() => !Reforming;
|
||||
}
|
||||
|
||||
@@ -35,13 +35,8 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// 15NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction
|
||||
// Launch
|
||||
Vector2 launchVel = (Owner.Calamity().mouseWorld - target.Center).SafeNormalize(Vector2.UnitY) * 16;
|
||||
target.velocity = launchVel;
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 16, true);
|
||||
|
||||
target.AddBuff(BuffID.Wet, 300);
|
||||
target.AddBuff(ModContent.BuffType<Buffs.DamageOverTime.RiptideDebuff>(), 180);
|
||||
|
||||
@@ -46,12 +46,8 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
public override bool? CanDamage() => base.CanDamage();
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (target.CanBeMoved(true))
|
||||
{
|
||||
// Custom knockback
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld) * 15;
|
||||
target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
}
|
||||
Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld);
|
||||
target.MoveNPC(launchVel, 15, true);
|
||||
}
|
||||
|
||||
public override bool? CanCutTiles() => false;
|
||||
|
||||
@@ -208,8 +208,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
else
|
||||
modifiers.SourceDamage *= 0.2f;
|
||||
|
||||
if (target.CanBeMoved(true))
|
||||
target.velocity = Utils.DirectionTo(Owner.Center, target.Center) * (poweredTimer == 0 ? 7 : 3) * (target.knockBackResist == 0 ? 0.5f : 1f);
|
||||
target.MoveNPC(Utils.DirectionTo(Owner.Center, target.Center), (poweredTimer == 0 ? 7 : 3));
|
||||
|
||||
if (Projectile.numHits == 0 && poweredTimer == 0)
|
||||
{
|
||||
|
||||
@@ -38,6 +38,10 @@ namespace CalamityMod.Tiles
|
||||
{
|
||||
Main.tileSpelunker[TileID.LunarOre] = true;
|
||||
Main.tileOreFinderPriority[TileID.LunarOre] = 900;
|
||||
|
||||
// Allow Queen Bee larvae to be protected by Guide to Environmental Protection
|
||||
// Yes this naming is backwards. Do not blame me!
|
||||
TileID.Sets.TileCutIgnore.IgnoreDontHurtNature[TileID.Larva] = true;
|
||||
}
|
||||
|
||||
public override void KillTile(int i, int j, int type, ref bool fail, ref bool effectOnly, ref bool noItem)
|
||||
@@ -319,10 +323,10 @@ namespace CalamityMod.Tiles
|
||||
DropItem(i, j, ModContent.ItemType<EvilSmasher>(), quantity: 1, asStack: true);
|
||||
}
|
||||
}
|
||||
// Drop Golden Bombs at a 1.75% chance from Pots
|
||||
// Drop Golden Bombs at a 0.5% chance from Pots
|
||||
if (type == TileID.Pots)
|
||||
{
|
||||
if (Main.rand.NextBool(57))
|
||||
if (Main.rand.NextBool(200))
|
||||
{
|
||||
DropItem(i, j, ModContent.ItemType<GoldenBomb>(), quantity: 1, asStack: true);
|
||||
}
|
||||
|
||||
@@ -749,11 +749,11 @@ namespace CalamityMod
|
||||
{
|
||||
if (target.CanBeMoved(ignoreKBImmune))
|
||||
{
|
||||
// Launch
|
||||
Vector2 launchVel = direction.SafeNormalize(Vector2.UnitX) * strength;
|
||||
float knockbackMult = Utils.Remap(target.knockBackResist, 0, 1, 0.5f, 1f, false);
|
||||
target.velocity = launchVel * (knockbackMult > 1 ? (float)Math.Pow(knockbackMult, 10) : knockbackMult);
|
||||
}
|
||||
target.SyncMotionToServer();
|
||||
}
|
||||
public static void Inflict246DebuffsNPC(NPC target, int buff, float timeBase = 2f)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user