Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
This commit is contained in:
commit
0d39da72ac
10 files changed
+96
-8
No files matched your search
@@ -15,10 +15,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 26;
|
||||
Item.height = 70;
|
||||
Item.damage = 37;
|
||||
Item.damage = 36;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = 25;
|
||||
Item.useAnimation = 25;
|
||||
Item.useTime = 29;
|
||||
Item.useAnimation = 29;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 4f;
|
||||
@@ -36,8 +36,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
for (int index = 0; index < 2; ++index)
|
||||
{
|
||||
float SpeedX = velocity.X + Main.rand.Next(-30, 31) * 0.05f;
|
||||
float SpeedY = velocity.Y + Main.rand.Next(-30, 31) * 0.05f;
|
||||
float SpeedX = velocity.X + Main.rand.Next(-25, 26) * 0.05f;
|
||||
float SpeedY = velocity.Y + Main.rand.Next(-25, 26) * 0.05f;
|
||||
|
||||
if (CalamityUtils.CheckWoodenAmmo(type, player))
|
||||
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType<MistArrow>(), damage, knockback, player.whoAmI);
|
||||
|
||||
@@ -635,7 +635,7 @@ HoarfrostBow: {
|
||||
Tooltip:
|
||||
'''
|
||||
Fires two arrows at once
|
||||
Converts wooden arrows into mist arrows
|
||||
Converts wooden arrows into mist arrows that spread frost mist on collision
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -129,6 +129,7 @@ MineralMortarProjectile.DisplayName: Onyx Bomb
|
||||
MiniatureFolly.DisplayName: Miniature Folly
|
||||
MiniSharkron.DisplayName: Mini Sharkron
|
||||
MistArrow.DisplayName: Mist Arrow
|
||||
MistArrowFrostMist.DisplayName: Frost Mist
|
||||
MortarRoundProj.DisplayName: Mortar
|
||||
NeedlerProj.DisplayName: Needle
|
||||
NorfleetComet.DisplayName: Comet
|
||||
|
||||
@@ -1183,7 +1183,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
shop.Add(ItemType<HowlsHeart>())
|
||||
.AddWithCustomValue(ItemID.MagicMissile, Item.buyPrice(gold: 5))
|
||||
.AddWithCustomValue(ItemID.RodofDiscord, Item.buyPrice(gold: 10), Condition.Hardmode, Condition.InHallow)
|
||||
.AddWithCustomValue(ItemID.RodofDiscord, Item.buyPrice(gold: 12, silver: 50), Condition.Hardmode, Condition.InHallow)
|
||||
.AddWithCustomValue(ItemID.SpectreStaff, Item.buyPrice(gold: 25), Condition.DownedGolem)
|
||||
.AddWithCustomValue(ItemID.InfernoFork, Item.buyPrice(gold: 25), Condition.DownedGolem)
|
||||
.AddWithCustomValue(ItemID.ShadowbeamStaff, Item.buyPrice(gold: 25), Condition.DownedGolem)
|
||||
|
||||
@@ -1691,7 +1691,10 @@ namespace CalamityMod.NPCs.Yharon
|
||||
|
||||
// Despawn safety, make sure to target another player if the current player target is too far away
|
||||
if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
{
|
||||
NPC.TargetClosest();
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
|
||||
Player targetData = Main.player[NPC.target];
|
||||
|
||||
@@ -1700,6 +1703,7 @@ namespace CalamityMod.NPCs.Yharon
|
||||
if (targetData.dead || !targetData.active)
|
||||
{
|
||||
NPC.TargetClosest();
|
||||
NPC.netUpdate = true;
|
||||
targetData = Main.player[NPC.target];
|
||||
if (targetData.dead || !targetData.active)
|
||||
{
|
||||
|
||||
@@ -69,12 +69,22 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Smoke, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 100, new Color(237, 242, 242, 200), 1f);
|
||||
}
|
||||
|
||||
int mistAmt = 2;
|
||||
for (int m = 0; m < mistAmt; m++)
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
int frostMist = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(Main.rand.NextFloat(-4f, 4f), Main.rand.NextFloat(-4f, 4f)), ModContent.ProjectileType<MistArrowFrostMist>(), (int)(Projectile.damage * 0.35f), (int)(Projectile.knockBack * 0.5f), Main.myPlayer, Main.rand.Next(3));
|
||||
Main.projectile[frostMist].rotation = Main.rand.NextFloat(-MathHelper.Pi, MathHelper.Pi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn2, 180);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
public class MistArrowFrostMist : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Ranged";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = Projectile.height = 24;
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 60;
|
||||
Projectile.alpha = 96;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
Projectile.coldDamage = true;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Projectile.timeLeft < 20)
|
||||
{
|
||||
Projectile.alpha += 8;
|
||||
if (Projectile.alpha >= 255)
|
||||
{
|
||||
Projectile.alpha = 255;
|
||||
Projectile.Kill();
|
||||
}
|
||||
}
|
||||
|
||||
Projectile.velocity *= 0.975f;
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 dustPosition = new Vector2(Projectile.position.X + Main.rand.NextFloat(0f, Projectile.width), Projectile.position.Y + Main.rand.NextFloat(0f, Projectile.height));
|
||||
Dust frostDust = Dust.NewDustPerfect(dustPosition, 16, Vector2.Zero, 0, default, 0.45f);
|
||||
frostDust.noGravity = true;
|
||||
}
|
||||
Lighting.AddLight(Projectile.Center, 0.4f, 0.4f, 0.4f);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
switch (Projectile.ai[0])
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/MistArrowFrostMist2").Value;
|
||||
break;
|
||||
case 2:
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/MistArrowFrostMist3").Value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2, 1f, SpriteEffects.None);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Frostburn2, 45);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 370 B |
Binary file not shown.
|
After Width: | Height: | Size: 366 B |
Binary file not shown.
|
After Width: | Height: | Size: 367 B |
Reference in new issue
Block a user