1 - Crabulon, Astrum Aureus and Ravager can now walk on platforms.

2 - True melee damage tooltip only displays on true melee weapons.
3 - True melee code adjustments to make it better.
This commit is contained in:
Andrew Marheine committed 2021-09-19 18:25:38 -05:00
1 parent c9576f8e7b
commit 8e887c0c21
58 files changed
+285 -228

No files matched your search

-69
View File
@@ -77,7 +77,6 @@ namespace CalamityMod
public class CalamityLists
{
public static IList<string> donatorList;
public static List<int> trueMeleeProjectileList; // DO NOT, EVER, DELETE THIS LIST, OR I WILL COME FOR YOU :D
public static List<int> rangedProjectileExceptionList;
public static List<int> projectileDestroyExceptionList;
public static List<int> projectileMinionList;
@@ -515,73 +514,6 @@ namespace CalamityMod
"James"
};
trueMeleeProjectileList = new List<int>()
{
// Vanilla shit
ProjectileID.Spear,
ProjectileID.Trident,
ProjectileID.TheRottedFork,
ProjectileID.Swordfish,
ProjectileID.Arkhalis,
ProjectileID.DarkLance,
ProjectileID.CobaltNaginata,
ProjectileID.PalladiumPike,
ProjectileID.MythrilHalberd,
ProjectileID.OrichalcumHalberd,
ProjectileID.AdamantiteGlaive,
ProjectileID.TitaniumTrident,
ProjectileID.MushroomSpear,
ProjectileID.Gungnir,
ProjectileID.ObsidianSwordfish,
ProjectileID.MonkStaffT1,
ProjectileID.MonkStaffT2,
// Tools
ProjectileID.CobaltDrill,
ProjectileID.MythrilDrill,
ProjectileID.AdamantiteDrill,
ProjectileID.PalladiumDrill,
ProjectileID.OrichalcumDrill,
ProjectileID.TitaniumDrill,
ProjectileID.ChlorophyteDrill,
ProjectileID.CobaltChainsaw,
ProjectileID.MythrilChainsaw,
ProjectileID.AdamantiteChainsaw,
ProjectileID.PalladiumChainsaw,
ProjectileID.OrichalcumChainsaw,
ProjectileID.TitaniumChainsaw,
ProjectileID.ChlorophyteChainsaw,
ProjectileID.VortexDrill,
ProjectileID.VortexChainsaw,
ProjectileID.NebulaDrill,
ProjectileID.NebulaChainsaw,
ProjectileID.SolarFlareDrill,
ProjectileID.SolarFlareChainsaw,
ProjectileID.StardustDrill,
ProjectileID.StardustChainsaw,
ProjectileID.Hamdrax,
ProjectileID.ChlorophyteJackhammer,
ProjectileID.SawtoothShark,
ProjectileID.ButchersChainsaw,
// Calamity shit
ProjectileType<DevilsSunriseProj>(),
ProjectileType<MarniteObliteratorProj>(),
ProjectileType<MurasamaSlash>(),
ProjectileType<AstralPikeProj>(),
ProjectileType<BrimlanceProj>(),
ProjectileType<DiseasedPikeSpear>(),
ProjectileType<ExsanguinationLanceProjectile>(),
ProjectileType<FulgurationHalberdProj>(),
ProjectileType<GildedProboscisProj>(),
ProjectileType<MarniteSpearProjectile>(),
ProjectileType<SausageMakerSpear>(),
ProjectileType<YateveoBloomSpear>(),
ProjectileType<HydraulicVoltCrasherProjectile>(),
ProjectileType<DragonRageStaff>(),
ProjectileType<TaintedBladeSlasher>()
};
rangedProjectileExceptionList = new List<int>()
{
ProjectileID.Phantasm,
@@ -2956,7 +2888,6 @@ namespace CalamityMod
public static void UnloadLists()
{
donatorList = null;
trueMeleeProjectileList = null;
rangedProjectileExceptionList = null;
projectileDestroyExceptionList = null;
projectileMinionList = null;
+13 -1
View File
@@ -2,6 +2,9 @@ using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.CalPlayer;
using CalamityMod.Events;
using CalamityMod.NPCs;
using CalamityMod.NPCs.AstrumAureus;
using CalamityMod.NPCs.Crabulon;
using CalamityMod.NPCs.Ravager;
using CalamityMod.Projectiles;
using CalamityMod.Tiles.DraedonStructures;
using CalamityMod.World;
@@ -127,7 +130,7 @@ namespace CalamityMod.ILEditing
IL.Terraria.Player.AddBuff += AllowBuffTimeStackingForManaBurn;
// Ravager platform fall fix
On.Terraria.NPC.Collision_DecideFallThroughPlatforms += EnableCalamityBossPlatformCollision;
// Damage and health balance
IL.Terraria.Main.DamageVar += AdjustDamageVariance;
@@ -337,6 +340,15 @@ namespace CalamityMod.ILEditing
return orig(i, j, forced);
}
private static bool EnableCalamityBossPlatformCollision(On.Terraria.NPC.orig_Collision_DecideFallThroughPlatforms orig, NPC self)
{
if ((self.type == ModContent.NPCType<AstrumAureus>() || self.type == ModContent.NPCType<CrabulonIdle>() || self.type == ModContent.NPCType<RavagerBody>()) &&
self.target >= 0 && Main.player[self.target].position.Y > self.position.Y + self.height)
return true;
return orig(self);
}
private static void DisableTeleporters(On.Terraria.Wiring.orig_Teleport orig)
{
if (CalamityPlayer.areThereAnyDamnBosses)
+55 -2
View File
@@ -80,6 +80,7 @@ namespace CalamityMod.Items
public bool devItem = false;
public bool challengeDrop = false;
public bool canFirePointBlankShots = false;
public bool trueMelee = false;
// See RogueWeapon.cs for rogue modifier shit
#region Modifiers
@@ -204,6 +205,42 @@ namespace CalamityMod.Items
canFirePointBlankShots = true;
break;
// Set projectile true melee items to be true melee, this is so bosses know when the player is using a true melee projectile weapon
case ItemID.Spear:
case ItemID.Trident:
case ItemID.PalladiumPike:
case ItemID.ObsidianSwordfish:
case ItemID.CobaltDrill:
case ItemID.MythrilDrill:
case ItemID.AdamantiteDrill:
case ItemID.PalladiumDrill:
case ItemID.OrichalcumDrill:
case ItemID.TitaniumDrill:
case ItemID.ChlorophyteDrill:
case ItemID.CobaltChainsaw:
case ItemID.MythrilChainsaw:
case ItemID.AdamantiteChainsaw:
case ItemID.PalladiumChainsaw:
case ItemID.OrichalcumChainsaw:
case ItemID.TitaniumChainsaw:
case ItemID.ChlorophyteChainsaw:
case ItemID.VortexDrill:
case ItemID.VortexChainsaw:
case ItemID.NebulaDrill:
case ItemID.NebulaChainsaw:
case ItemID.SolarFlareDrill:
case ItemID.SolarFlareChainsaw:
case ItemID.StardustDrill:
case ItemID.StardustChainsaw:
case ItemID.Drax:
case ItemID.ChlorophyteJackhammer:
case ItemID.SawtoothShark:
case ItemID.Arkhalis:
case ItemID.ButchersChainsaw:
case ItemID.MonkStaffT2:
trueMelee = true;
break;
case ItemID.Dynamite:
case ItemID.StickyDynamite:
case ItemID.BouncyDynamite:
@@ -313,6 +350,7 @@ namespace CalamityMod.Items
break;
case ItemID.AdamantiteGlaive:
trueMelee = true;
item.damage = 65;
item.shootSpeed *= 1.25f;
break;
@@ -322,25 +360,30 @@ namespace CalamityMod.Items
break;
case ItemID.CobaltNaginata:
trueMelee = true;
item.damage = 90;
break;
case ItemID.Gungnir:
trueMelee = true;
item.damage = 92;
item.shootSpeed *= 1.25f;
break;
case ItemID.MythrilHalberd:
trueMelee = true;
item.damage = 95;
item.shootSpeed *= 1.25f;
break;
case ItemID.OrichalcumHalberd:
trueMelee = true;
item.damage = 98;
item.shootSpeed *= 1.25f;
break;
case ItemID.TitaniumTrident:
trueMelee = true;
item.damage = 72;
item.shootSpeed *= 1.25f;
break;
@@ -350,18 +393,22 @@ namespace CalamityMod.Items
break;
case ItemID.TheRottedFork:
trueMelee = true;
item.damage = 20;
break;
case ItemID.Swordfish:
trueMelee = true;
item.damage = 38;
break;
case ItemID.DarkLance:
trueMelee = true;
item.damage = 68;
break;
case ItemID.MushroomSpear:
trueMelee = true;
item.damage = 100;
break;
@@ -407,6 +454,7 @@ namespace CalamityMod.Items
break;
case ItemID.MonkStaffT1:
trueMelee = true;
item.damage = 110;
break;
@@ -819,7 +867,7 @@ namespace CalamityMod.Items
#region SavingAndLoading
public override bool NeedsSaving(Item item)
{
return rogue || canFirePointBlankShots || timesUsed != 0 || customRarity != 0 || Charge != 0 || reforgeTier != 0 || AppliedEnchantment.HasValue || DischargeEnchantExhaustion != 0;
return rogue || canFirePointBlankShots || trueMelee || timesUsed != 0 || customRarity != 0 || Charge != 0 || reforgeTier != 0 || AppliedEnchantment.HasValue || DischargeEnchantExhaustion != 0;
}
public override TagCompound Save(Item item)
@@ -833,7 +881,8 @@ namespace CalamityMod.Items
["reforgeTier"] = reforgeTier,
["enchantmentID"] = AppliedEnchantment.HasValue ? AppliedEnchantment.Value.ID : 0,
["DischargeEnchantExhaustion"] = DischargeEnchantExhaustion,
["canFirePointBlankShots"] = canFirePointBlankShots
["canFirePointBlankShots"] = canFirePointBlankShots,
["trueMelee"] = trueMelee
};
}
@@ -841,6 +890,7 @@ namespace CalamityMod.Items
{
rogue = tag.GetBool("rogue");
canFirePointBlankShots = tag.GetBool("canFirePointBlankShots");
trueMelee = tag.GetBool("trueMelee");
timesUsed = tag.GetInt("timesUsed");
customRarity = (CalamityRarity)tag.GetInt("rarity");
@@ -874,6 +924,7 @@ namespace CalamityMod.Items
BitsByte flags = reader.ReadByte();
rogue = flags[0];
canFirePointBlankShots = flags[1];
trueMelee = flags[2];
}
else
{
@@ -886,6 +937,7 @@ namespace CalamityMod.Items
BitsByte flags = new BitsByte();
flags[0] = rogue;
flags[1] = canFirePointBlankShots;
flags[2] = trueMelee;
writer.Write(flags);
writer.Write((int)customRarity);
@@ -901,6 +953,7 @@ namespace CalamityMod.Items
BitsByte flags = reader.ReadByte();
rogue = flags[0];
canFirePointBlankShots = flags[1];
trueMelee = flags[2];
customRarity = (CalamityRarity)reader.ReadInt32();
timesUsed = reader.ReadInt32();
+2 -2
View File
@@ -33,8 +33,8 @@ namespace CalamityMod.Items
if (nameLine != null)
ApplyRarityColor(item, nameLine);
// If the item is melee, add a true melee damage number adjacent to the standard damage number.
if (item.melee && item.damage > 0 && Main.LocalPlayer.Calamity().trueMeleeDamage > 0D)
// If the item is true melee, add a true melee damage number adjacent to the standard damage number.
if (item.melee && (item.shoot == ProjectileID.None || trueMelee) && item.damage > 0 && Main.LocalPlayer.Calamity().trueMeleeDamage > 0D)
TrueMeleeDamageTooltip(item, tooltips);
// Modify all vanilla tooltips before appending mod mechanics (if any).
+2 -1
View File
@@ -33,7 +33,8 @@ namespace CalamityMod.Items.Tools
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<MarniteObliteratorProj>();
item.shootSpeed = 40f;
}
item.Calamity().trueMelee = true;
}
public override void AddRecipes()
{
@@ -45,6 +45,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
item.melee = true;
item.channel = true;
modItem.trueMelee = true;
modItem.UsesCharge = true;
modItem.MaxCharge = 85f;
modItem.ChargePerUse = 0f; // This weapon is a holdout. Charge is consumed by the holdout projectile.
+2 -1
View File
@@ -33,7 +33,8 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = ItemRarityID.Cyan;
item.shoot = ModContent.ProjectileType<AstralPikeProj>();
item.shootSpeed = 13f;
}
item.Calamity().trueMelee = true;
}
// Terraria seems to really dislike high crit values in SetDefaults
public override void GetWeaponCrit(Player player, ref int crit) => crit += 25;
+2 -1
View File
@@ -32,7 +32,8 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = ItemRarityID.Pink;
item.shoot = ModContent.ProjectileType<BrimlanceProj>();
item.shootSpeed = 12f;
}
item.Calamity().trueMelee = true;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
}
+2 -1
View File
@@ -36,7 +36,8 @@ namespace CalamityMod.Items.Weapons.Melee
item.Calamity().customRarity = CalamityRarity.Turquoise;
item.Calamity().donorItem = true;
item.shoot = ModContent.ProjectileType<DevilsSunriseProj>();
item.Calamity().trueMelee = true;
item.shoot = ModContent.ProjectileType<DevilsSunriseProj>();
item.shootSpeed = 24f;
}
+2 -1
View File
@@ -32,7 +32,8 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = ItemRarityID.Yellow;
item.shoot = ModContent.ProjectileType<DiseasedPikeSpear>();
item.shootSpeed = 10f;
}
item.Calamity().trueMelee = true;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
}
+2 -1
View File
@@ -35,6 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.value = CalamityGlobalItem.Rarity15BuyPrice;
item.rare = ItemRarityID.Purple;
item.Calamity().customRarity = CalamityRarity.Violet;
}
item.Calamity().trueMelee = true;
}
}
}
+2 -1
View File
@@ -33,7 +33,8 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = ItemRarityID.Yellow;
item.shoot = ModContent.ProjectileType<ExsanguinationLanceProjectile>();
item.shootSpeed = 10f;
}
item.Calamity().trueMelee = true;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
+2 -1
View File
@@ -33,7 +33,8 @@ namespace CalamityMod.Items.Weapons.Melee
item.value = Item.buyPrice(0, 36, 0, 0);
item.rare = ItemRarityID.Pink;
item.shootSpeed = 8f;
}
item.Calamity().trueMelee = true;
}
public override bool AltFunctionUse(Player player)
{
+2 -1
View File
@@ -32,7 +32,8 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = ItemRarityID.Purple;
item.shoot = ModContent.ProjectileType<GildedProboscisProj>();
item.shootSpeed = 13f;
}
item.Calamity().trueMelee = true;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
}
+2 -1
View File
@@ -31,7 +31,8 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = ItemRarityID.Green;
item.shoot = ModContent.ProjectileType<MarniteSpearProjectile>();
item.shootSpeed = 5f;
}
item.Calamity().trueMelee = true;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
+1
View File
@@ -42,6 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.shootSpeed = 24f;
item.Calamity().customRarity = CalamityRarity.Violet;
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 14));
item.Calamity().trueMelee = true;
}
// Terraria seems to really dislike high crit values in SetDefaults
+2 -1
View File
@@ -34,7 +34,8 @@ namespace CalamityMod.Items.Weapons.Melee
item.shoot = ModContent.ProjectileType<OmnibladeSwing>();
item.shootSpeed = 24f;
item.rare = ItemRarityID.Yellow;
}
item.Calamity().trueMelee = true;
}
// Terraria seems to really dislike high crit values in SetDefaults
public override void GetWeaponCrit(Player player, ref int crit) => crit += 45;
@@ -34,6 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.shoot = ModContent.ProjectileType<PhosphorescentGauntletPunches>();
item.shootSpeed = 1f;
item.Calamity().customRarity = CalamityRarity.PureGreen;
item.Calamity().trueMelee = true;
}
// Terraria seems to really dislike high crit values in SetDefaults.
+2 -1
View File
@@ -33,7 +33,8 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = ItemRarityID.Orange;
item.shoot = ModContent.ProjectileType<SausageMakerSpear>();
item.shootSpeed = 6f;
}
item.Calamity().trueMelee = true;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
+2 -1
View File
@@ -45,7 +45,8 @@ namespace CalamityMod.Items.Weapons.Melee
item.shoot = ModContent.ProjectileType<YateveoBloomProj>();
item.shootSpeed = ShootSpeed;
}
item.Calamity().trueMelee = true;
}
public override bool AltFunctionUse(Player player)
{
+43 -34
View File
@@ -1637,7 +1637,7 @@ namespace CalamityMod.NPCs
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = player.inventory[player.selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num824 *= 0.5f;
}
@@ -1753,7 +1753,7 @@ namespace CalamityMod.NPCs
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = player.inventory[player.selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num833 *= 0.5f;
}
@@ -2773,7 +2773,7 @@ namespace CalamityMod.NPCs
// Increase defense
npc.defense = npc.defDefense;
// Stop colliding with tiles
// Stop colliding with tiles
npc.noTileCollide = true;
// Set AI to next phase (Walk) and reset other AI
@@ -2782,8 +2782,8 @@ namespace CalamityMod.NPCs
npc.ai[1] = 0f;
npc.netUpdate = true;
}
CustomGravity();
else
CustomGravity();
}
// Walk
@@ -2815,41 +2815,50 @@ namespace CalamityMod.NPCs
npc.velocity.X = (npc.velocity.X * 20f - num823) / 21f;
}
// Walk through tiles if colliding with tiles and player is out of reach
int num854 = 80;
int num855 = 20;
Vector2 position2 = new Vector2(npc.Center.X - (num854 / 2), npc.position.Y + npc.height - num855);
bool flag52 = false;
if (npc.position.X < player.position.X && npc.position.X + npc.width > player.position.X + player.width && npc.position.Y + npc.height < player.position.Y + player.height - 16f)
flag52 = true;
if (flag52)
if (Collision.CanHit(npc.position, npc.width, npc.height, player.Center, 1, 1) && !Collision.SolidCollision(npc.position, npc.width, npc.height) && player.position.Y <= npc.position.Y + npc.height)
{
npc.velocity.Y += 0.5f;
}
else if (Collision.SolidCollision(position2, num854, num855))
{
if (npc.velocity.Y > 0f)
npc.velocity.Y = 0f;
if (npc.velocity.Y > -0.2)
npc.velocity.Y -= 0.025f;
else
npc.velocity.Y -= 0.2f;
if (npc.velocity.Y < -4f)
npc.velocity.Y = -4f;
CustomGravity();
npc.noTileCollide = false;
}
else
{
if (npc.velocity.Y < 0f)
npc.velocity.Y = 0f;
npc.noTileCollide = true;
// Walk through tiles if colliding with tiles and player is out of reach
int num854 = 80;
int num855 = 20;
Vector2 position2 = new Vector2(npc.Center.X - (num854 / 2), npc.position.Y + npc.height - num855);
if (npc.velocity.Y < 0.1)
npc.velocity.Y += 0.025f;
else
bool flag52 = false;
if (npc.position.X < player.position.X && npc.position.X + npc.width > player.position.X + player.width && npc.position.Y + npc.height < player.position.Y + player.height - 16f)
flag52 = true;
if (flag52)
{
npc.velocity.Y += 0.5f;
}
else if (Collision.SolidCollision(position2, num854, num855))
{
if (npc.velocity.Y > 0f)
npc.velocity.Y = 0f;
if (npc.velocity.Y > -0.2)
npc.velocity.Y -= 0.025f;
else
npc.velocity.Y -= 0.2f;
if (npc.velocity.Y < -4f)
npc.velocity.Y = -4f;
}
else
{
if (npc.velocity.Y < 0f)
npc.velocity.Y = 0f;
if (npc.velocity.Y < 0.1)
npc.velocity.Y += 0.025f;
else
npc.velocity.Y += 0.5f;
}
}
// Walk for a maximum of 6 seconds
+5 -5
View File
@@ -5401,7 +5401,7 @@ namespace CalamityMod.NPCs
num422 = 0.175f;
}
// Reduce acceleration if target is holding a true melee weapon
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num421 *= 0.75f;
num422 *= 0.5f;
@@ -5512,7 +5512,7 @@ namespace CalamityMod.NPCs
num431 = 0.25f;
}
// Reduce acceleration if target is holding a true melee weapon
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num430 *= 0.75f;
num431 *= 0.5f;
@@ -5974,7 +5974,7 @@ namespace CalamityMod.NPCs
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num399 *= 0.75f;
num400 *= 0.5f;
@@ -6084,7 +6084,7 @@ namespace CalamityMod.NPCs
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num409 *= 0.75f;
num410 *= 0.5f;
@@ -7409,7 +7409,7 @@ namespace CalamityMod.NPCs
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
acceleration *= 0.5f;
}
+38 -30
View File
@@ -280,41 +280,49 @@ namespace CalamityMod.NPCs.Crabulon
npc.velocity.X = (npc.velocity.X * 20f - num823) / 21f;
}
int num854 = 80;
int num855 = 20;
Vector2 position2 = new Vector2(npc.Center.X - (num854 / 2), npc.position.Y + npc.height - num855);
if (Collision.CanHit(npc.position, npc.width, npc.height, player.Center, 1, 1) && !Collision.SolidCollision(npc.position, npc.width, npc.height) && player.position.Y <= npc.position.Y + npc.height)
{
npc.noGravity = false;
npc.noTileCollide = false;
}
else
{
npc.noGravity = true;
npc.noTileCollide = true;
bool fallDownOnTopOfTarget = npc.position.X < player.position.X && npc.position.X + npc.width > player.position.X + player.width && npc.position.Y + npc.height < player.position.Y + player.height - 16f;
if (fallDownOnTopOfTarget)
{
npc.velocity.Y += 0.5f;
}
else if (Collision.SolidCollision(position2, num854, num855))
{
if (npc.velocity.Y > 0f)
npc.velocity.Y = 0f;
int num854 = 80;
int num855 = 20;
Vector2 position2 = new Vector2(npc.Center.X - (num854 / 2), npc.position.Y + npc.height - num855);
if (npc.velocity.Y > -0.2f)
npc.velocity.Y -= 0.025f;
else
npc.velocity.Y -= 0.2f;
bool fallDownOnTopOfTarget = npc.position.X < player.position.X && npc.position.X + npc.width > player.position.X + player.width && npc.position.Y + npc.height < player.position.Y + player.height - 16f;
if (fallDownOnTopOfTarget)
{
npc.velocity.Y += 0.5f;
}
else if (Collision.SolidCollision(position2, num854, num855))
{
if (npc.velocity.Y > 0f)
npc.velocity.Y = 0f;
if (npc.velocity.Y < -4f)
npc.velocity.Y = -4f;
}
else
{
if (npc.velocity.Y < 0f)
npc.velocity.Y = 0f;
if (npc.velocity.Y > -0.2f)
npc.velocity.Y -= 0.025f;
else
npc.velocity.Y -= 0.2f;
if (npc.velocity.Y < 0.1f)
npc.velocity.Y += 0.025f;
else
npc.velocity.Y += 0.5f;
}
if (npc.velocity.Y < -4f)
npc.velocity.Y = -4f;
}
else
{
if (npc.velocity.Y < 0f)
npc.velocity.Y = 0f;
if (npc.ai[1] % 25f == 24f)
npc.netUpdate = true;
if (npc.velocity.Y < 0.1f)
npc.velocity.Y += 0.025f;
else
npc.velocity.Y += 0.5f;
}
}
npc.ai[1] += 1f;
if (npc.ai[1] >= (360f - (death ? 120f * (1f - lifeRatio) : 0f)))
+31 -32
View File
@@ -170,6 +170,8 @@ namespace CalamityMod.NPCs.Ravager
bool immunePhase = headActive || rightClawActive || leftClawActive || rightLegActive || leftLegActive;
bool finalPhase = !leftClawActive && !rightClawActive && !headActive && !leftLegActive && !rightLegActive && expertMode;
bool phase2 = npc.ai[0] == 2f;
bool reduceFallSpeed = npc.velocity.Y > 0f && npc.Bottom.Y > player.Top.Y;
if (immunePhase)
{
@@ -306,10 +308,16 @@ namespace CalamityMod.NPCs.Ravager
}
}
if (npc.ai[0] == 0f)
{
npc.noTileCollide = false;
if (npc.noTileCollide && !player.dead)
{
if (npc.velocity.Y > 0f && npc.Bottom.Y > player.Top.Y)
npc.noTileCollide = false;
else if (Collision.CanHit(npc.position, npc.width, npc.height, player.Center, 1, 1) && !Collision.SolidCollision(npc.position, npc.width, npc.height))
npc.noTileCollide = false;
}
if (npc.ai[0] == 0f)
{
if (npc.velocity.Y == 0f)
{
npc.velocity.X *= 0.8f;
@@ -335,10 +343,14 @@ namespace CalamityMod.NPCs.Ravager
float jumpGateValue = 180f;
if (npc.ai[1] >= jumpGateValue)
npc.ai[1] = -20f;
else if (npc.ai[1] == -1f)
{
npc.TargetClosest();
{
npc.ai[1] = -20f;
}
else if (npc.ai[1] == -1f)
{
npc.noTileCollide = true;
npc.TargetClosest();
bool shouldFall = player.position.Y >= npc.Bottom.Y;
float velocityXBoost = death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio);
@@ -353,7 +365,7 @@ namespace CalamityMod.NPCs.Ravager
if (distanceBelowTarget > 0f)
calamityGlobalNPC.newAI[1] += 1f + distanceBelowTarget * multiplier;
float speedMultLimit = malice ? 4f : 3f;
float speedMultLimit = malice ? 3f : 2f;
if (calamityGlobalNPC.newAI[1] > speedMultLimit)
calamityGlobalNPC.newAI[1] = speedMultLimit;
@@ -363,7 +375,6 @@ namespace CalamityMod.NPCs.Ravager
if (expertMode && !finalPhase)
{
npc.noTileCollide = true;
if (shouldFall)
velocityY = 1f;
@@ -382,19 +393,16 @@ namespace CalamityMod.NPCs.Ravager
}
if (finalPhase)
{
npc.noTileCollide = true;
calamityGlobalNPC.newAI[2] = player.direction;
}
float playerLocation = npc.Center.X - player.Center.X;
npc.direction = playerLocation < 0 ? 1 : -1;
npc.velocity.X = velocityX * npc.direction;
npc.velocity.Y = velocityY;
npc.velocity.Y = velocityY;
npc.ai[0] = finalPhase ? 2f : 1f;
npc.ai[1] = 0f;
npc.ai[0] = finalPhase ? 2f : 1f;
npc.ai[1] = 0f;
}
}
@@ -460,21 +468,12 @@ namespace CalamityMod.NPCs.Ravager
}
else
{
// Fall through
if (!player.dead && expertMode)
{
if ((player.position.Y > npc.Bottom.Y && npc.velocity.Y > 0f) || (player.position.Y < npc.Bottom.Y && npc.velocity.Y < 0f))
npc.noTileCollide = true;
else if ((npc.velocity.Y > 0f && npc.Bottom.Y > Main.player[npc.target].Top.Y) || (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].Center, 1, 1) && !Collision.SolidCollision(npc.position, npc.width, npc.height)))
npc.noTileCollide = false;
}
Vector2 targetVector = player.position;
float aimY = targetVector.Y - 640f;
float distanceFromTargetPos = Math.Abs(npc.Top.Y - aimY);
bool inRange = npc.Top.Y <= aimY + 160f && npc.Top.Y >= aimY - 16f;
if (npc.ai[0] == 2f && npc.ai[1] == 0f)
if (phase2 && npc.ai[1] == 0f)
{
calamityGlobalNPC.newAI[3] += 1f;
@@ -492,7 +491,7 @@ namespace CalamityMod.NPCs.Ravager
}
float maxOffset = death ? 320f * (1f - lifeRatio) : 240f * (1f - lifeRatio);
float offset = npc.ai[0] == 2f ? maxOffset * calamityGlobalNPC.newAI[2] : 0f;
float offset = phase2 ? maxOffset * calamityGlobalNPC.newAI[2] : 0f;
// Set offset to 0 if the target stops moving
if (Math.Abs(player.velocity.X) < 0.5f)
@@ -504,7 +503,7 @@ namespace CalamityMod.NPCs.Ravager
{
npc.damage = npc.defDamage;
if (npc.ai[0] == 2f)
if (phase2)
{
float stopBeforeFallTime = malice ? 25f : 30f;
if (expertMode)
@@ -565,7 +564,7 @@ namespace CalamityMod.NPCs.Ravager
if (!leftLegActive)
velocityX += 1f;
if (npc.ai[0] == 2f)
if (phase2)
{
npc.damage = 0;
velocityXChange *= velocityMult;
@@ -589,8 +588,8 @@ namespace CalamityMod.NPCs.Ravager
void CustomGravity()
{
float gravity = npc.ai[0] == 2f ? 0f : 0.45f;
float maxFallSpeed = npc.ai[0] == 2f ? 24f : 15f;
float gravity = phase2 ? 0f : 0.45f;
float maxFallSpeed = reduceFallSpeed ? 12f : phase2 ? 24f : 15f;
if (malice)
{
gravity *= 1.25f;
@@ -608,14 +607,14 @@ namespace CalamityMod.NPCs.Ravager
player = Main.player[npc.target];
if (npc.target <= 0 || npc.target == 255 || player.dead || !player.active)
{
npc.TargetClosest(true);
npc.TargetClosest();
player = Main.player[npc.target];
}
int distanceFromTarget = 5600;
if (Vector2.Distance(npc.Center, player.Center) > distanceFromTarget)
{
npc.TargetClosest(true);
npc.TargetClosest();
player = Main.player[npc.target];
if (Vector2.Distance(npc.Center, player.Center) > distanceFromTarget)
+6 -6
View File
@@ -1367,7 +1367,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = player.inventory[player.selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num824 *= 0.5f;
}
@@ -1619,7 +1619,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = player.inventory[player.selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num413 *= 0.5f;
}
@@ -1735,7 +1735,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = player.HeldItem;
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num833 *= 0.5f;
}
@@ -2021,7 +2021,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = player.inventory[player.selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num824 *= 0.5f;
}
@@ -2266,7 +2266,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = player.inventory[player.selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num413 *= 0.5f;
}
@@ -2383,7 +2383,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = player.inventory[player.selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num833 *= 0.5f;
}
+1 -1
View File
@@ -97,7 +97,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num677 *= 0.5f;
}
+1 -1
View File
@@ -97,7 +97,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || targetSelectedItem.Calamity().trueMelee))
{
num677 *= 0.5f;
}
+1 -1
View File
@@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Boss
// The direction of the host NPC.
Vector2 hostNPCDirection = Vector2.Normalize(ThingToAttachTo.velocity);
// Offset to move the beam forward so that it starts inside the NPC's mouth.
// Offset to move the beam forward so that it starts in Artemis' focus jewel thing.
float beamStartForwardsOffset = -70f;
// Set the starting location of the beam to the center of the NPC.
+45 -3
View File
@@ -128,11 +128,50 @@ namespace CalamityMod.Projectiles
#region SetDefaults
public override void SetDefaults(Projectile projectile)
{
if (CalamityLists.trueMeleeProjectileList.Contains(projectile.type))
trueMelee = true;
switch (projectile.type)
{
case ProjectileID.Spear:
case ProjectileID.Trident:
case ProjectileID.TheRottedFork:
case ProjectileID.Swordfish:
case ProjectileID.DarkLance:
case ProjectileID.CobaltNaginata:
case ProjectileID.PalladiumPike:
case ProjectileID.MythrilHalberd:
case ProjectileID.OrichalcumHalberd:
case ProjectileID.AdamantiteGlaive:
case ProjectileID.TitaniumTrident:
case ProjectileID.MushroomSpear:
case ProjectileID.Gungnir:
case ProjectileID.ObsidianSwordfish:
case ProjectileID.CobaltDrill:
case ProjectileID.MythrilDrill:
case ProjectileID.AdamantiteDrill:
case ProjectileID.PalladiumDrill:
case ProjectileID.OrichalcumDrill:
case ProjectileID.TitaniumDrill:
case ProjectileID.ChlorophyteDrill:
case ProjectileID.CobaltChainsaw:
case ProjectileID.MythrilChainsaw:
case ProjectileID.AdamantiteChainsaw:
case ProjectileID.PalladiumChainsaw:
case ProjectileID.OrichalcumChainsaw:
case ProjectileID.TitaniumChainsaw:
case ProjectileID.ChlorophyteChainsaw:
case ProjectileID.VortexDrill:
case ProjectileID.VortexChainsaw:
case ProjectileID.NebulaDrill:
case ProjectileID.NebulaChainsaw:
case ProjectileID.SolarFlareDrill:
case ProjectileID.SolarFlareChainsaw:
case ProjectileID.StardustDrill:
case ProjectileID.StardustChainsaw:
case ProjectileID.Hamdrax:
case ProjectileID.ChlorophyteJackhammer:
case ProjectileID.SawtoothShark:
trueMelee = true;
break;
case ProjectileID.Bullet:
case ProjectileID.MeteorShot:
case ProjectileID.BulletHighVelocity:
@@ -203,10 +242,12 @@ namespace CalamityMod.Projectiles
case ProjectileID.Arkhalis:
case ProjectileID.ButchersChainsaw:
trueMelee = true;
projectile.scale = 1.5f;
break;
case ProjectileID.MonkStaffT1:
trueMelee = true;
projectile.scale = 3f;
break;
@@ -227,6 +268,7 @@ namespace CalamityMod.Projectiles
break;
case ProjectileID.MonkStaffT2:
trueMelee = true;
projectile.idStaticNPCHitCooldown = 18;
break;
@@ -29,6 +29,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
projectile.ownerHitCheck = true;
projectile.melee = true;
projectile.scale = 1.75f;
projectile.Calamity().trueMelee = true;
}
public override void AI()
+1 -1
View File
@@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Melee
projectile.ownerHitCheck = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 5;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
public override void AI()
+1
View File
@@ -31,6 +31,7 @@ namespace CalamityMod.Projectiles.Melee
projectile.hide = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 5;
projectile.Calamity().trueMelee = true;
}
public override void AI()
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Melee
projectile.hide = true;
projectile.ownerHitCheck = true;
projectile.melee = true;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Melee
projectile.usesIDStaticNPCImmunity = true;
projectile.idStaticNPCHitCooldown = 21;
projectile.frameCounter = 0;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
@@ -25,7 +25,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
projectile.hide = true;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
+1 -1
View File
@@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -30,7 +30,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 5;
projectile.alpha = 255;
//projectile.Calamity().trueMelee = true;
}
public override SpearType SpearAiType => SpearType.GhastlyGlaiveSpear;
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
projectile.hide = true;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -26,7 +26,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
public override float ReelbackSpeed => 2.4f;
@@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ownerHitCheck = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 4;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
// These numbers sure are common, huh? yeah, they are
@@ -23,7 +23,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -27,7 +27,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -28,7 +28,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ownerHitCheck = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 5;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
-1
View File
@@ -27,7 +27,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.penetrate = -1;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 4;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 5.5f;
@@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -30,7 +30,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ownerHitCheck = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 7;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -25,7 +25,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -30,7 +30,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.hide = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 5;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -27,7 +27,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
projectile.usesIDStaticNPCImmunity = true;
projectile.idStaticNPCHitCooldown = 15;
}
@@ -24,7 +24,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -25,7 +25,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
@@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
projectile.ignoreWater = true;
projectile.penetrate = -1;
projectile.ownerHitCheck = true;
//projectile.Calamity().trueMelee = true;
projectile.Calamity().trueMelee = true;
}
public override float InitialSpeed => 3f;
+1
View File
@@ -118,6 +118,7 @@ namespace CalamityMod.Projectiles.Melee
projectile.timeLeft = 90000;
projectile.usesLocalNPCImmunity = true;
projectile.noEnchantments = true;
projectile.Calamity().trueMelee = true;
}
public override void SendExtraAI(BinaryWriter writer) => writer.Write(VerticalOffset);
@@ -51,9 +51,6 @@ namespace CalamityMod.Projectiles.Typeless
projectile.ownerHitCheck = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 20;
// Not considered true melee to prevent Titan Scale from triggering.
// projectile.Calamity().trueMelee = true;
}
public override void AI()