updated hypothermia to work better
This commit is contained in:
1 parent
cdfeef6522
commit
4609fc342f
3 files changed
+35
-44
No files matched your search
@@ -31,6 +31,7 @@ using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.Events;
|
||||
using Terraria.GameInput;
|
||||
@@ -3180,13 +3181,12 @@ namespace CalamityMod.CalPlayer
|
||||
player.hasPaladinShield = true;
|
||||
if (player.whoAmI != Main.myPlayer && player.miscCounter % 10 == 0)
|
||||
{
|
||||
int myPlayer = Main.myPlayer;
|
||||
if (Main.player[myPlayer].team == player.team && player.team != 0)
|
||||
if (Main.LocalPlayer.team == player.team && player.team != 0)
|
||||
{
|
||||
Vector2 otherPlayerPos = player.position - Main.player[myPlayer].position;
|
||||
Vector2 otherPlayerPos = player.position - Main.LocalPlayer.position;
|
||||
|
||||
if (otherPlayerPos.Length() < 800f)
|
||||
Main.player[myPlayer].AddBuff(BuffID.PaladinsShield, 20, true);
|
||||
Main.LocalPlayer.AddBuff(BuffID.PaladinsShield, 20, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3250,7 +3250,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
float ai1 = I * 120;
|
||||
Projectile.NewProjectile(player.Center.X + (float)(Math.Sin(I * 120) * 550), player.Center.Y + (float)(Math.Cos(I * 120) * 550), 0f, 0f,
|
||||
ModContent.ProjectileType<GhostlyMine>(), (int)((modPlayer.auricSet ? 15000f : 5000f) * player.MinionDamage()), 1f, player.whoAmI, ai1, 0f);
|
||||
ModContent.ProjectileType<GhostlyMine>(), (int)((modPlayer.auricSet ? 15000 : 5000) * player.MinionDamage()), 1f, player.whoAmI, ai1, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3423,7 +3423,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.npcTypeNoAggro[ModContent.NPCType<PlaguedJungleSlime>()] = true;
|
||||
player.npcTypeNoAggro[ModContent.NPCType<AstralSlime>()] = true;
|
||||
player.npcTypeNoAggro[ModContent.NPCType<GammaSlime>()] = true;
|
||||
// LATER -- When Wulfrum Slimes start being definitely robots, remove this immunity.
|
||||
// NOTE: These don't even spawn anymore.
|
||||
player.npcTypeNoAggro[ModContent.NPCType<WulfrumSlime>()] = true;
|
||||
}
|
||||
|
||||
@@ -3594,32 +3594,31 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
int brimmy = ModContent.ProjectileType<BrimstoneElementalMinion>();
|
||||
int siren = ModContent.ProjectileType<WaterElementalMinion>();
|
||||
int healer = ModContent.ProjectileType<SandElementalHealer>();
|
||||
int sandy = ModContent.ProjectileType<SandElementalMinion>();
|
||||
int cloudy = ModContent.ProjectileType<CloudElementalMinion>();
|
||||
int fungal = ModContent.ProjectileType<FungalClumpMinion>();
|
||||
int howl = ModContent.ProjectileType<HowlsHeartHowl>();
|
||||
int calcifer = ModContent.ProjectileType<HowlsHeartCalcifer>();
|
||||
int turnip = ModContent.ProjectileType<HowlsHeartTurnipHead>();
|
||||
if (player.ownedProjectileCounts[brimmy] > 1 || player.ownedProjectileCounts[siren] > 1 ||
|
||||
player.ownedProjectileCounts[healer] > 1 || player.ownedProjectileCounts[sandy] > 1 ||
|
||||
player.ownedProjectileCounts[cloudy] > 1 || player.ownedProjectileCounts[fungal] > 1 ||
|
||||
player.ownedProjectileCounts[howl] > 1 || player.ownedProjectileCounts[calcifer] > 1 ||
|
||||
player.ownedProjectileCounts[turnip] > 1)
|
||||
List<int> summonDeleteList = new List<int>()
|
||||
{
|
||||
for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++)
|
||||
ModContent.ProjectileType<BrimstoneElementalMinion>(),
|
||||
ModContent.ProjectileType<WaterElementalMinion>(),
|
||||
ModContent.ProjectileType<SandElementalHealer>(),
|
||||
ModContent.ProjectileType<SandElementalMinion>(),
|
||||
ModContent.ProjectileType<CloudElementalMinion>(),
|
||||
ModContent.ProjectileType<FungalClumpMinion>(),
|
||||
ModContent.ProjectileType<HowlsHeartHowl>(),
|
||||
ModContent.ProjectileType<HowlsHeartCalcifer>(),
|
||||
ModContent.ProjectileType<HowlsHeartTurnipHead>()
|
||||
};
|
||||
for (int i = 0; i < summonDeleteList.Count; i++)
|
||||
{
|
||||
if (player.ownedProjectileCounts[summonDeleteList[i]] > 1)
|
||||
{
|
||||
if (Main.projectile[projIndex].active && Main.projectile[projIndex].owner == player.whoAmI)
|
||||
for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++)
|
||||
{
|
||||
if (Main.projectile[projIndex].type == brimmy || Main.projectile[projIndex].type == siren ||
|
||||
Main.projectile[projIndex].type == healer || Main.projectile[projIndex].type == sandy ||
|
||||
Main.projectile[projIndex].type == cloudy || Main.projectile[projIndex].type == fungal ||
|
||||
Main.projectile[projIndex].type == howl || Main.projectile[projIndex].type == calcifer ||
|
||||
Main.projectile[projIndex].type == turnip)
|
||||
Projectile proj = Main.projectile[projIndex];
|
||||
if (proj.active && proj.owner == player.whoAmI)
|
||||
{
|
||||
Main.projectile[projIndex].Kill();
|
||||
if (summonDeleteList.Contains(proj.type))
|
||||
{
|
||||
proj.Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public class Hypothermia : RogueWeapon
|
||||
{
|
||||
private int counter = 0;
|
||||
private bool stealthChunks = false;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -46,30 +45,23 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting up the stealth strikes
|
||||
if (player.Calamity().StealthStrikeAvailable() && counter == 0) //setting up the stealth strikes
|
||||
{
|
||||
stealthChunks = true;
|
||||
}
|
||||
if (stealthChunks)
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<HypothermiaChunk>(), damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
else
|
||||
int projAmt = Main.rand.Next(1, 3);
|
||||
for (int index = 0; index < projAmt; ++index)
|
||||
{
|
||||
int projAmt = Main.rand.Next(1, 3);
|
||||
for (int index = 0; index < projAmt; ++index)
|
||||
{
|
||||
float SpeedX = speedX + (float)Main.rand.Next(-40, 41) * 0.05f;
|
||||
float SpeedY = speedY + (float)Main.rand.Next(-40, 41) * 0.05f;
|
||||
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, Main.rand.Next(4), 0f);
|
||||
}
|
||||
float SpeedX = speedX + Main.rand.NextFloat(-2f, 2f);
|
||||
float SpeedY = speedY + Main.rand.NextFloat(-2f, 2f);
|
||||
Projectile.NewProjectile(position, new Vector2(SpeedX, SpeedY), type, damage, knockBack, player.whoAmI, Main.rand.Next(4), 0f);
|
||||
}
|
||||
|
||||
counter++;
|
||||
if (counter >= 7)
|
||||
{
|
||||
counter = 0;
|
||||
stealthChunks = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ namespace CalamityMod.UI
|
||||
Texture2D barTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/StealthMeterBar");
|
||||
Texture2D fullBarTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/StealthMeterBarFull");
|
||||
spriteBatch.Draw(edgeTexture, DrawPosition, null, Color.White * modPlayer.stealthUIAlpha, 0f, edgeTexture.Size() * 0.5f, 1f, SpriteEffects.None, 0);
|
||||
if (modPlayer.rogueStealth >= modPlayer.rogueStealthMax * (modPlayer.stealthStrikeHalfCost ? 0.5f : 1f))
|
||||
if (modPlayer.StealthStrikeAvailable())
|
||||
{
|
||||
spriteBatch.Draw(indicatorTexture, DrawPosition, null, Color.White * modPlayer.stealthUIAlpha, 0f, indicatorTexture.Size() * 0.5f, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user