Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
This commit is contained in:
commit
5ec97e0e59
5 files changed
+38
-10
No files matched your search
@@ -17,14 +17,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
if (DownedBossSystem.downedSCal && DownedBossSystem.downedExoMechs && (player.maxMinions - player.slotsMinions) >= 10 && !player.Calamity().profanedCrystalForce)
|
||||
{
|
||||
player.Calamity().profanedCrystalBuffs = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyBuffTip(ref string tip, ref int rare)
|
||||
{
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
|
||||
@@ -8031,7 +8031,8 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 velocity = new Vector2(posVec.X, posVec.Y).RotatedBy(spinOffsetAngle);
|
||||
velocity.Normalize();
|
||||
velocity *= 8f;
|
||||
Projectile.NewProjectile(source, Main.projectile[i].Center + posVec, velocity, ModContent.ProjectileType<MiniGuardianSpear>(), dam, 0f, Player.whoAmI, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(source, Main.projectile[i].Center + posVec, velocity, ModContent.ProjectileType<MiniGuardianSpear>(), dam, 0f, Player.whoAmI, 0f, 0f);
|
||||
Main.projectile[proj].originalDamage = dam;
|
||||
}
|
||||
spearsFired++;
|
||||
}
|
||||
@@ -8079,6 +8080,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
public override void PostUpdate() //needs to be here else it doesn't work properly, otherwise i'd have stuck it with the wing anim stuffs
|
||||
{
|
||||
ProfanedSoulCrystal.DetermineTransformationEligibility(Player);
|
||||
if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide && Player.legs == EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Legs))
|
||||
{
|
||||
bool usingCarpet = Player.carpetTime > 0 && Player.controlJump; //doesn't make sense for carpet to use jump frame since you have solid ground
|
||||
|
||||
@@ -11,6 +11,7 @@ using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
using System.Linq;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -87,7 +88,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
}
|
||||
|
||||
else if (Main.player[Main.myPlayer].Calamity().profanedCrystalBuffs)
|
||||
else
|
||||
{
|
||||
TooltipLine line = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
|
||||
int manaCost = (int)(100 * Main.player[Main.myPlayer].manaCost);
|
||||
@@ -119,6 +120,14 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.profanedCrystalHide = true;
|
||||
}
|
||||
|
||||
internal static void DetermineTransformationEligibility(Player player)
|
||||
{
|
||||
if (DownedBossSystem.downedSCal && DownedBossSystem.downedExoMechs && (player.maxMinions - player.slotsMinions) >= 10 && !player.Calamity().profanedCrystalForce && player.HasBuff<ProfanedCrystalBuff>())
|
||||
{
|
||||
player.Calamity().profanedCrystalBuffs = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Moved from CalamityGlobalItem since it's just a function called in one place.
|
||||
internal static bool TransformItemUsage(Item item, Player player)
|
||||
{
|
||||
@@ -192,12 +201,18 @@ namespace CalamityMod.Items.Accessories
|
||||
case 2: //boomer
|
||||
int proj = Projectile.NewProjectile(source, player.Center, perturbedspeed, ModContent.ProjectileType<ProfanedCrystalRangedHuges>(), boomDamage, 0f, player.whoAmI, projType == 1 ? 1f : 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
Main.projectile[proj].originalDamage = boomBaseDamage;
|
||||
}
|
||||
break;
|
||||
case 3: //bab boomer
|
||||
int proj2 = Projectile.NewProjectile(source, player.Center, perturbedspeed, ModContent.ProjectileType<ProfanedCrystalRangedSmalls>(), boomDamage, 0f, player.whoAmI, 0f);
|
||||
if (proj2.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj2].Calamity().forceMinion = true;
|
||||
Main.projectile[proj2].originalDamage = boomBaseDamage;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (projType > 1)
|
||||
@@ -235,7 +250,10 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
int proj = Projectile.NewProjectile(source, player.position, correctedVelocity, ModContent.ProjectileType<ProfanedCrystalMageFireball>(), magefireDamage, 1f, player.whoAmI, enrage ? 1f : 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
Main.projectile[proj].originalDamage = magefireBaseDamage;
|
||||
}
|
||||
player.Calamity().profanedSoulWeaponUsage = enrage ? 20 : 25;
|
||||
}
|
||||
if (player.Calamity().profanedSoulWeaponUsage > 0)
|
||||
@@ -257,7 +275,10 @@ namespace CalamityMod.Items.Accessories
|
||||
int shardDamage = (int)player.GetDamage<SummonDamageClass>().ApplyTo(shardBaseDamage);
|
||||
int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), shardDamage, 1f, player.whoAmI, 0f, 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
Main.projectile[proj].originalDamage = shardBaseDamage;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
player.Calamity().profanedSoulWeaponUsage = 0;
|
||||
@@ -269,7 +290,10 @@ namespace CalamityMod.Items.Accessories
|
||||
int shardDamage = (int)player.GetDamage<SummonDamageClass>().ApplyTo(shardBaseDamage);
|
||||
int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), shardDamage, 1f, player.whoAmI, 1f, 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
Main.projectile[proj].originalDamage = shardBaseDamage;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
player.Calamity().profanedSoulWeaponUsage += enrage ? 1 : 2;
|
||||
|
||||
@@ -797,6 +797,7 @@ namespace CalamityMod.Items
|
||||
}
|
||||
|
||||
// Conversion for Profaned Soul Crystal
|
||||
ProfanedSoulCrystal.DetermineTransformationEligibility(player);
|
||||
if (modPlayer.profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.CountsAsClass<ThrowingDamageClass>() || item.CountsAsClass<MagicDamageClass>() || item.CountsAsClass<RangedDamageClass>() || item.CountsAsClass<MeleeDamageClass>()))
|
||||
return player.altFunctionUse == 0 ? ProfanedSoulCrystal.TransformItemUsage(item, player) : AltFunctionUse(item, player);
|
||||
|
||||
|
||||
@@ -51,7 +51,10 @@ namespace CalamityMod.Projectiles.Summon
|
||||
velocity *= 8f;
|
||||
int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + outerPosVec, velocity, ModContent.ProjectileType<ProfanedCrystalMageFireballSplit>(), damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].originalDamage = damage;
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
}
|
||||
if (innerSplits > 0) //only runs if there's still inner splits to create
|
||||
{
|
||||
innerPosVec = innerPosVec.RotatedBy(innerAngleVariance);
|
||||
@@ -60,7 +63,10 @@ namespace CalamityMod.Projectiles.Summon
|
||||
velocity *= 5f;
|
||||
proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + innerPosVec, velocity, ModContent.ProjectileType<ProfanedCrystalMageFireballSplit>(), damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].originalDamage = damage;
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
}
|
||||
}
|
||||
innerSplits--;
|
||||
}
|
||||
@@ -626,7 +632,10 @@ namespace CalamityMod.Projectiles.Summon
|
||||
correctedVelocity *= 25f;
|
||||
int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), pos, correctedVelocity, ModContent.ProjectileType<ProfanedCrystalRangedHuges>(), (int)((double)Projectile.damage * 1.5f), Projectile.knockBack, Projectile.owner, 2);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].originalDamage = (int)(Projectile.originalDamage * 1.5);
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
}
|
||||
((ProfanedCrystalRangedHuges)Main.projectile[proj].ModProjectile).boomerSwarm = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user