The last side things. 286 errors
This commit is contained in:
1 parent
a530af5502
commit
0d8aadff8c
103 files changed
+231
-247
No files matched your search
@@ -1607,7 +1607,7 @@ namespace CalamityMod.CalPlayer
|
||||
if ((target.life < target.lifeMax * 0.5) && bloodflareHeartTimer <= 0)
|
||||
{
|
||||
bloodflareHeartTimer = 300;
|
||||
DropHelper.DropItem(target, ItemID.Heart);
|
||||
Item.NewItem(target.GetItemSource_Loot(), target.Hitbox, ItemID.Heart);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1831,7 +1831,7 @@ namespace CalamityMod.CalPlayer
|
||||
if ((target.life < target.lifeMax * 0.5) && bloodflareHeartTimer <= 0)
|
||||
{
|
||||
bloodflareHeartTimer = 300;
|
||||
DropHelper.DropItem(target, ItemID.Heart);
|
||||
Item.NewItem(target.GetItemSource_Loot(), target.Hitbox, ItemID.Heart);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -66,7 +66,8 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
if (player.controlJump && !player.canJumpAgain_Cloud && player.jump == 0 && player.velocity.Y != 0f && !player.mount.Active && !player.mount.Cart)
|
||||
{
|
||||
int p = Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X * 0f, 2f, ModContent.ProjectileType<FrostShardFriendly>(), (int)(25 * player.AverageDamage()), 3f, player.whoAmI, 1f);
|
||||
var source = player.GetProjectileSource_Accessory(Item);
|
||||
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, player.velocity.X * 0f, 2f, ModContent.ProjectileType<FrostShardFriendly>(), (int)(25 * player.AverageDamage()), 3f, player.whoAmI, 1f);
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[p].Calamity().forceTypeless = true;
|
||||
|
||||
@@ -48,13 +48,14 @@ namespace CalamityMod.Items.Armor
|
||||
player.noFallDmg = true;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = player.GetProjectileSource_Item(Item);
|
||||
if (player.FindBuffIndex(ModContent.BuffType<AerospecSummonSetBuff>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AerospecSummonSetBuff>(), 3600, true);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<Valkyrie>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<Valkyrie>(), (int)(20 * player.MinionDamage()), 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<Valkyrie>(), (int)(20 * player.MinionDamage()), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
player.GetDamage(DamageClass.Summon) += 0.11f;
|
||||
|
||||
@@ -49,13 +49,14 @@ namespace CalamityMod.Items.Armor
|
||||
modPlayer.chaosSpirit = true;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = player.GetProjectileSource_Item(Item);
|
||||
if (player.FindBuffIndex(ModContent.BuffType<AtaxiaSummonSetBuff>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AtaxiaSummonSetBuff>(), 3600, true);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<ChaosSpirit>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<ChaosSpirit>(), (int)(190f * player.MinionDamage()), 0f, Main.myPlayer, 38f, 0f);
|
||||
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<ChaosSpirit>(), (int)(190f * player.MinionDamage()), 0f, Main.myPlayer, 38f, 0f);
|
||||
}
|
||||
}
|
||||
player.GetDamage(DamageClass.Summon) += 0.4f;
|
||||
|
||||
@@ -66,13 +66,14 @@ namespace CalamityMod.Items.Armor
|
||||
}
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = player.GetProjectileSource_Item(Item);
|
||||
if (player.FindBuffIndex(ModContent.BuffType<SilvaSummonSetBuff>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<SilvaSummonSetBuff>(), 3600, true);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<SilvaCrystal>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SilvaCrystal>(), (int)(1200f * player.MinionDamage()), 0f, Main.myPlayer, -20f, 0f);
|
||||
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SilvaCrystal>(), (int)(1200f * player.MinionDamage()), 0f, Main.myPlayer, -20f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,13 +45,14 @@ namespace CalamityMod.Items.Armor
|
||||
modPlayer.daedalusCrystal = true;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = player.GetProjectileSource_Item(Item);
|
||||
if (player.FindBuffIndex(ModContent.BuffType<DaedalusSummonSetBuff>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<DaedalusSummonSetBuff>(), 3600, true);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<DaedalusCrystal>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<DaedalusCrystal>(), (int)(95f * player.MinionDamage()), 0f, Main.myPlayer, 50f, 0f);
|
||||
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<DaedalusCrystal>(), (int)(95f * player.MinionDamage()), 0f, Main.myPlayer, 50f, 0f);
|
||||
}
|
||||
}
|
||||
player.GetDamage(DamageClass.Summon) += 0.2f;
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace CalamityMod.Items.Armor
|
||||
if (player.whoAmI == Main.myPlayer && !modPlayer.chibii)
|
||||
{
|
||||
modPlayer.redDevil = true;
|
||||
var source = player.GetProjectileSource_Item(Item);
|
||||
if (player.FindBuffIndex(ModContent.BuffType<DemonshadeSetDevilBuff>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<DemonshadeSetDevilBuff>(), 3600, true);
|
||||
@@ -64,7 +65,7 @@ namespace CalamityMod.Items.Armor
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<DemonshadeRedDevil>()] < 1)
|
||||
{
|
||||
int damage = (int)(10000 * player.AverageDamage());
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<DemonshadeRedDevil>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<DemonshadeRedDevil>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
player.GetDamage(DamageClass.Summon) += 1f;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Armor
|
||||
modPlayer.godSlayerThrowing = true;
|
||||
modPlayer.rogueStealthMax += 1.2f;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
string hotkey = CalamityMod.GodSlayerDashHotKey.TooltipHotkeyString();
|
||||
string hotkey = CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString();
|
||||
player.setBonus = "Allows you to dash for an immense distance in 8 directions\n" +
|
||||
"Press " + hotkey + " while holding down the movement keys in the direction you want to dash\n" +
|
||||
"Enemies you dash through take massive damage\n" +
|
||||
|
||||
@@ -51,13 +51,14 @@ namespace CalamityMod.Items.Armor
|
||||
player.maxMinions += 4;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = player.GetProjectileSource_Item(Item);
|
||||
if (player.FindBuffIndex(ModContent.BuffType<ShellfishBuff>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<ShellfishBuff>(), 3600, true);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<Shellfish>()] < 2)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<Shellfish>(), (int)(140 * player.MinionDamage()), 0f, player.whoAmI);
|
||||
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<Shellfish>(), (int)(140 * player.MinionDamage()), 0f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
player.Calamity().wearingRogueArmor = true;
|
||||
|
||||
@@ -57,13 +57,14 @@ namespace CalamityMod.Items.Armor
|
||||
player.maxMinions += 3;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = player.GetProjectileSource_Item(Item);
|
||||
if (player.FindBuffIndex(ModContent.BuffType<PlaguebringerSummonBuff>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<PlaguebringerSummonBuff>(), 3600, true);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<PlaguebringerSummon>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<PlaguebringerSummon>(), (int)(80 * player.MinionDamage()), 0f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<PlaguebringerSummon>(), (int)(80 * player.MinionDamage()), 0f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,13 +56,14 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = player.GetProjectileSource_Item(Item);
|
||||
if (player.FindBuffIndex(ModContent.BuffType<ReaverOrbBuff>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<ReaverOrbBuff>(), 3600, true);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<ReaverOrb>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<ReaverOrb>(), 0, 0f, player.whoAmI);
|
||||
Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<ReaverOrb>(), 0, 0f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
if (player.miscCounter % 10 == 0)
|
||||
|
||||
@@ -53,13 +53,14 @@ namespace CalamityMod.Items.Armor
|
||||
"Summons an ancient leaf prism to blast your enemies with life energy";
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = player.GetProjectileSource_Item(Item);
|
||||
if (player.FindBuffIndex(ModContent.BuffType<SilvaSummonSetBuff>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<SilvaSummonSetBuff>(), 3600, true);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<SilvaCrystal>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SilvaCrystal>(), (int)(600f * player.MinionDamage()), 0f, Main.myPlayer, -20f, 0f);
|
||||
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SilvaCrystal>(), (int)(600f * player.MinionDamage()), 0f, Main.myPlayer, -20f, 0f);
|
||||
}
|
||||
}
|
||||
player.GetDamage(DamageClass.Summon) += 0.65f;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -34,13 +35,13 @@ namespace CalamityMod.Items.Materials
|
||||
{
|
||||
float scale = baseScale * outwardnessFactor;
|
||||
Vector2 drawPosition = baseDrawPosition + (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 4f;
|
||||
spriteBatch.Draw(Main.itemTexture[Item.type], drawPosition, frame, drawColor, Item.velocity.X * 0.2f, frame.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
spriteBatch.Draw(TextureAssets.Item[Item.type].Value, drawPosition, frame, drawColor, Item.velocity.X * 0.2f, frame.Size() * 0.5f, scale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Rectangle frame = Main.itemTexture[Item.type].Frame();
|
||||
Rectangle frame = TextureAssets.Item[Item.type].Value.Frame();
|
||||
DrawBackAfterimage(spriteBatch, Item.position - Main.screenPosition + frame.Size() * 0.5f, frame, scale);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.NPCs.AstrumAureus;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
|
||||
namespace CalamityMod.Items.SummonItems
|
||||
{
|
||||
@@ -38,7 +39,7 @@ namespace CalamityMod.Items.SummonItems
|
||||
SoundEngine.PlaySound(SoundID.Roar, player.position, 0);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int npc = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-250, 251)), (int)(player.position.Y - 500f), ModContent.NPCType<AstrumAureus>(), 1);
|
||||
int npc = NPC.NewNPC(new EntitySource_BossSpawn(player), (int)(player.position.X + Main.rand.Next(-250, 251)), (int)(player.position.Y - 500f), ModContent.NPCType<AstrumAureus>(), 1);
|
||||
Main.npc[npc].timeLeft *= 20;
|
||||
CalamityUtils.BossAwakenMessage(npc);
|
||||
}
|
||||
|
||||
@@ -85,13 +85,13 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
private void OnHitEffects(Player player, Vector2 targetPos)
|
||||
{
|
||||
|
||||
// Individual true melee homing missiles deal 10% of the weapon's base damage.
|
||||
int numSplits = 5;
|
||||
int trueMeleeID = ModContent.ProjectileType<AtaraxiaHoming>();
|
||||
int trueMeleeDamage = (int)(0.1f * Item.damage * player.MeleeDamage());
|
||||
float angleVariance = MathHelper.TwoPi / (float)numSplits;
|
||||
float spinOffsetAngle = MathHelper.Pi / (2f * numSplits);
|
||||
var source = player.GetProjectileSource_Item(Item);
|
||||
Vector2 posVec = new Vector2(8f, 0f).RotatedByRandom(MathHelper.TwoPi);
|
||||
|
||||
for (int i = 0; i < numSplits; ++i)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -31,10 +31,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.UseSound = SoundID.Item1;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback)
|
||||
{
|
||||
type = ModContent.ProjectileType<SeashineSwordProj>();
|
||||
return base.Shoot(player, ref position, ref velocity.X, ref velocity.Y, ref type, ref damage, ref knockBack);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
Vector2 spawnPos = new Vector2(player.MountedCenter.X + Main.rand.Next(-200, 201), player.MountedCenter.Y - 600f);
|
||||
Vector2 targetPos = Main.MouseWorld + new Vector2(Main.rand.Next(-30, 31), Main.rand.Next(-30, 31));
|
||||
Vector2 velocity = targetPos - spawnPos;
|
||||
velocity = targetPos - spawnPos;
|
||||
velocity.Normalize();
|
||||
velocity *= 13f;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
int heartDrop = CalamityPlayer.areThereAnyDamnBosses ? 1 : Main.rand.Next(1, 3);
|
||||
for (int i = 0; i < heartDrop; i++)
|
||||
{
|
||||
Item.NewItem((int)target.position.X, (int)target.position.Y, target.width, target.height, 58, 1, false, 0, false, false);
|
||||
Item.NewItem(player.GetItemSource_OnHit(target, 0), (int)target.position.X, (int)target.position.Y, target.width, target.height, 58, 1, false, 0, false, false);
|
||||
}
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item14, target.position);
|
||||
|
||||
@@ -127,8 +127,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
Vector2 Shift = Utils.SafeNormalize(velocity.RotatedBy(MathHelper.PiOver2), Vector2.Zero) * 30;
|
||||
|
||||
Projectile.NewProjectile(source, player.Center + Shift, velocity.X.RotatedBy(MathHelper.PiOver4 * 0.3f) , ProjectileType<AncientStar>(), (int)(damage * glassStarDamageMultiplier), knockback, player.whoAmI, Charge > 0 ? 1 : 0);
|
||||
Projectile.NewProjectile(source, player.Center - Shift, velocity.X.RotatedBy(-MathHelper.PiOver4 * 0.3f), ProjectileType<AncientStar>(), (int)(damage * glassStarDamageMultiplier), knockback, player.whoAmI, Charge > 0 ? 1 : 0);
|
||||
Projectile.NewProjectile(source, player.Center + Shift, velocity.RotatedBy(MathHelper.PiOver4 * 0.3f) , ProjectileType<AncientStar>(), (int)(damage * glassStarDamageMultiplier), knockback, player.whoAmI, Charge > 0 ? 1 : 0);
|
||||
Projectile.NewProjectile(source, player.Center - Shift, velocity.RotatedBy(-MathHelper.PiOver4 * 0.3f), ProjectileType<AncientStar>(), (int)(damage * glassStarDamageMultiplier), knockback, player.whoAmI, Charge > 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().canFirePointBlankShots = true;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo spawnSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter);
|
||||
float num117 = MathHelper.Pi * 0.1f;
|
||||
@@ -75,7 +75,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
newType = ModContent.ProjectileType<TorrentialArrow>();
|
||||
break;
|
||||
}
|
||||
int proj = Projectile.NewProjectile(source.X + offset.X, source.Y + offset.Y, velocity.X, velocity.Y, newType, damage, knockback, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(spawnSource, source.X + offset.X, source.Y + offset.Y, velocity.X, velocity.Y, newType, damage, knockback, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].arrow = true;
|
||||
@@ -84,7 +84,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
else
|
||||
{
|
||||
int proj = Projectile.NewProjectile(source.X + offset.X, source.Y + offset.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(spawnSource, source.X + offset.X, source.Y + offset.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI);
|
||||
Main.projectile[proj].noDropItem = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().canFirePointBlankShots = true;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo spawnSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float piOver10 = MathHelper.Pi * 0.1f;
|
||||
@@ -56,10 +56,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
offset -= velocity;
|
||||
|
||||
if (type == ProjectileID.WoodenArrowFriendly)
|
||||
Projectile.NewProjectile(source + offset, velocity, ModContent.ProjectileType<LunarBolt2>(), damage, knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(spawnSource, source + offset, velocity, ModContent.ProjectileType<LunarBolt2>(), damage, knockback, player.whoAmI);
|
||||
else
|
||||
{
|
||||
int proj = Projectile.NewProjectile(source + offset, velocity, type, damage, knockback, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(spawnSource, source + offset, velocity, type, damage, knockback, player.whoAmI);
|
||||
Main.projectile[proj].noDropItem = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return new Vector2(-5, 0);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo spawnSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float piOverTen = MathHelper.Pi * 0.1f;
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
offset -= velocity;
|
||||
}
|
||||
Projectile.NewProjectile(source.X + offset.X, source.Y + offset.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(spawnSource, source.X + offset.X, source.Y + offset.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().canFirePointBlankShots = true;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo spawnSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float piOver10 = 0.1f * MathHelper.Pi;
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
offset -= velocity;
|
||||
}
|
||||
int index = Projectile.NewProjectile(source + offset, velocity * 0.6f, ProjectileID.SlimeGun, damage / 4, 0f, player.whoAmI);
|
||||
int index = Projectile.NewProjectile(spawnSource, source + offset, velocity * 0.6f, ProjectileID.SlimeGun, damage / 4, 0f, player.whoAmI);
|
||||
if (index.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[index].Calamity().forceRanged = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().canFirePointBlankShots = true;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo spawnSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float piOverTen = MathHelper.Pi * 0.1f;
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
type = ProjectileID.FireArrow;
|
||||
}
|
||||
int num121 = Projectile.NewProjectile(source + offset, velocity, type, damage, knockback, player.whoAmI);
|
||||
int num121 = Projectile.NewProjectile(spawnSource, source + offset, velocity, type, damage, knockback, player.whoAmI);
|
||||
Main.projectile[num121].noDropItem = true;
|
||||
}
|
||||
for (int i = 0; i < 2; i++)
|
||||
@@ -73,7 +73,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
ProjectileID.HellfireArrow,
|
||||
ProjectileID.IchorArrow
|
||||
});
|
||||
int index = Projectile.NewProjectile(source, position, new Vector2(SpeedX, SpeedY), type, (int)(damage * 0.5f), knockback, player.whoAmI);
|
||||
int index = Projectile.NewProjectile(spawnSource, position, new Vector2(SpeedX, SpeedY), type, (int)(damage * 0.5f), knockback, player.whoAmI);
|
||||
Main.projectile[index].noDropItem = true;
|
||||
Main.projectile[index].usesLocalNPCImmunity = true;
|
||||
Main.projectile[index].localNPCHitCooldown = 10;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().canFirePointBlankShots = true;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo spawnSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
Vector2 vel = velocity;
|
||||
@@ -84,12 +84,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
// Teal exo arrows deal less damage.
|
||||
float dmgMult = thisArrowType == ProjectileType<TealExoArrow>() ? 0.66f : 1f;
|
||||
int finalDamage = (int)(damage * dmgMult);
|
||||
Projectile.NewProjectile(source + offset, vel, thisArrowType, finalDamage, knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(spawnSource, source + offset, vel, thisArrowType, finalDamage, knockback, player.whoAmI);
|
||||
}
|
||||
else
|
||||
{
|
||||
int normalArrowDamage = (int)(damage * NormalArrowDamageMult);
|
||||
int proj = Projectile.NewProjectile(source + offset, vel, type, normalArrowDamage, knockback, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(spawnSource, source + offset, vel, type, normalArrowDamage, knockback, player.whoAmI);
|
||||
Main.projectile[proj].noDropItem = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().canFirePointBlankShots = true;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo spawnSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float piOver10 = MathHelper.Pi * 0.1f;
|
||||
@@ -56,10 +56,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
offset -= velocity;
|
||||
|
||||
if (type == ProjectileID.WoodenArrowFriendly)
|
||||
Projectile.NewProjectile(source + offset, velocity, ModContent.ProjectileType<LunarBolt>(), damage, knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(spawnSource, source + offset, velocity, ModContent.ProjectileType<LunarBolt>(), damage, knockback, player.whoAmI);
|
||||
else
|
||||
{
|
||||
int proj = Projectile.NewProjectile(source + offset, velocity, type, damage, knockback, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(spawnSource, source + offset, velocity, type, damage, knockback, player.whoAmI);
|
||||
Main.projectile[proj].noDropItem = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().canFirePointBlankShots = true;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo spawnSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter);
|
||||
float piOver10 = MathHelper.Pi * 0.1f;
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
newType = ModContent.ProjectileType<TyphoonArrow>();
|
||||
break;
|
||||
}
|
||||
int proj = Projectile.NewProjectile(source.X + offset.X, source.Y + offset.Y, velocity.X, velocity.Y, newType, (int)(damage * 1.1), knockback, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(spawnSource, source.X + offset.X, source.Y + offset.Y, velocity.X, velocity.Y, newType, (int)(damage * 1.1), knockback, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].arrow = true;
|
||||
@@ -79,7 +79,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
else
|
||||
{
|
||||
int proj = Projectile.NewProjectile(source.X + offset.X, source.Y + offset.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI);
|
||||
int proj = Projectile.NewProjectile(spawnSource, source.X + offset.X, source.Y + offset.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI);
|
||||
Main.projectile[proj].noDropItem = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -43,12 +43,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
|
||||
// Fire the Onyx Shard that is characteristic of the Onyx Blaster
|
||||
// The shard deals 250% damage and double knockback
|
||||
int shardDamage = (int)(2.5f * damage);
|
||||
float shardKB = 2f * knockBack;
|
||||
float shardKB = 2f * knockback;
|
||||
Vector2 offset = new Vector2(Main.rand.Next(-25, 26) * 0.05f, Main.rand.Next(-25, 26) * 0.05f);
|
||||
Projectile shard = Projectile.NewProjectileDirect(source, position, velocity + offset, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f);
|
||||
shard.timeLeft = (int)(shard.timeLeft * 1.25f);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -47,12 +47,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
|
||||
// Fire the Onyx Shard that is characteristic of the Onyx Blaster
|
||||
// The shard deals 145% damage and double knockback
|
||||
int shardDamage = (int)(1.45f * damage);
|
||||
float shardKB = 2f * knockBack;
|
||||
float shardKB = 2f * knockback;
|
||||
Projectile shard = Projectile.NewProjectileDirect(source, position, velocity, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f);
|
||||
shard.timeLeft = (int)(shard.timeLeft * 1.4f);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
@@ -42,8 +42,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
int i = Main.myPlayer;
|
||||
float num72 = Main.rand.Next(25, 30);
|
||||
float num74 = knockBack;
|
||||
num74 = player.GetWeaponKnockback(Item, num74);
|
||||
player.itemTime = Item.useTime;
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
@@ -88,17 +86,17 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-120, 121) * 0.01f;
|
||||
if (type == ProjectileID.WoodenArrowFriendly)
|
||||
{
|
||||
Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, ModContent.ProjectileType<Bolt>(), damage, num74, i);
|
||||
Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, ModContent.ProjectileType<Bolt>(), damage, num74, i);
|
||||
Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, ModContent.ProjectileType<Bolt>(), damage, num74, i);
|
||||
Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, ModContent.ProjectileType<Bolt>(), damage, knockback, i);
|
||||
Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, ModContent.ProjectileType<Bolt>(), damage, knockback, i);
|
||||
Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, ModContent.ProjectileType<Bolt>(), damage, knockback, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
int num121 = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, type, damage, num74, i);
|
||||
int num121 = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, type, damage, knockback, i);
|
||||
Main.projectile[num121].noDropItem = true;
|
||||
int num122 = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, type, damage, num74, i);
|
||||
int num122 = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, type, damage, knockback, i);
|
||||
Main.projectile[num122].noDropItem = true;
|
||||
int num123 = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, type, damage, num74, i);
|
||||
int num123 = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, type, damage, knockback, i);
|
||||
Main.projectile[num123].noDropItem = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
Vector2 center = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float piOverTen = MathHelper.Pi * 0.1f;
|
||||
int projCount = 3;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
offset -= velocity;
|
||||
}
|
||||
Projectile.NewProjectile(source.X + offset.X, source.Y + offset.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(source, center.X + offset.X, center.Y + offset.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.GameContent;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
@@ -51,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
{
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, Main.itemTexture[Item.type]);
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, TextureAssets.Item[Item.type].Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
}
|
||||
|
||||
// Gains 10% of missing health as base damage.
|
||||
public override void SafeModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
|
||||
public override void SafeModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat)
|
||||
{
|
||||
int lifeAmount = player.statLifeMax2 - player.statLife;
|
||||
flat += lifeAmount * 0.1f * player.RogueDamage();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -68,9 +68,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override float SafeSetUseTimeMultiplier(Player player) => player.altFunctionUse == 2 ? 5f / 9f : 1f;
|
||||
|
||||
public override void SafeModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
|
||||
public override void SafeModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat)
|
||||
{
|
||||
mult += flexMult - 1f;
|
||||
damage *= flexMult;
|
||||
}
|
||||
|
||||
// Reset flex multiplier on direct hits.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
p.Calamity().stealthStrike = true;
|
||||
int pID = p.identity;
|
||||
|
||||
CreateOrbs(position, (int)(orbDamage * 0.675f), knockback, pID, player, true);
|
||||
CreateOrbs(source, position, (int)(orbDamage * 0.675f), knockback, pID, player, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -77,7 +77,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
int pIndex = Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI, 0f, 1f);
|
||||
int pID = Main.projectile[pIndex].identity;
|
||||
|
||||
CreateOrbs(position, orbDamage, knockback, pID, player, false);
|
||||
CreateOrbs(source, position, orbDamage, knockback, pID, player, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
CreateRecipe(1).AddIngredient(ItemID.SpikyBall, 30).AddIngredient(ItemID.LightShard).AddIngredient(ItemID.DarkShard).AddRecipeGroup("AnyMythrilBar", 2).AddTile(TileID.MythrilAnvil).Register();
|
||||
}
|
||||
|
||||
private static void CreateOrbs(Vector2 position, int damage, float knockback, int projectileID, Player player, bool stealth)
|
||||
private static void CreateOrbs(IEntitySource source, Vector2 position, int damage, float knockback, int projectileID, Player player, bool stealth)
|
||||
{
|
||||
float rotationOffset = 0f;
|
||||
|
||||
@@ -150,6 +150,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
rotationOffset += MathHelper.ToRadians(72f);
|
||||
}
|
||||
|
||||
|
||||
int orb1 = Projectile.NewProjectile(source, position, Vector2.Zero, ModContent.ProjectileType<NychthemeronOrb>(), damage, knockback, player.whoAmI, orb1Col, projectileID);
|
||||
int orb2 = Projectile.NewProjectile(source, position, Vector2.Zero, ModContent.ProjectileType<NychthemeronOrb>(), damage, knockback, player.whoAmI, orb2Col, projectileID);
|
||||
if (orb1.WithinBounds(Main.maxProjectiles))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.CalPlayer;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -6,6 +6,7 @@ using System.Linq;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Utilities;
|
||||
using CalamityMod.Prefixes;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
@@ -32,26 +33,26 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override int ChoosePrefix(UnifiedRandom rand)
|
||||
{
|
||||
WeightedRandom<string> newPrefix = new WeightedRandom<string>();
|
||||
newPrefix.Add("Pointy", 1);
|
||||
newPrefix.Add("Sharp", 1);
|
||||
newPrefix.Add("Feathered", 1);
|
||||
newPrefix.Add("Sleek", 1);
|
||||
newPrefix.Add("Hefty", 1);
|
||||
newPrefix.Add("Mighty", 1);
|
||||
newPrefix.Add("Glorious", 1);
|
||||
newPrefix.Add("Serrated", 1);
|
||||
newPrefix.Add("Vicious", 1);
|
||||
newPrefix.Add("Lethal", 1);
|
||||
newPrefix.Add("Flawless", 1);
|
||||
newPrefix.Add("Radical", 1);
|
||||
newPrefix.Add("Blunt", 1);
|
||||
newPrefix.Add("Flimsy", 1);
|
||||
newPrefix.Add("Unbalanced", 1);
|
||||
newPrefix.Add("Atrocious", 1);
|
||||
return Mod.GetPrefix(newPrefix).Type;
|
||||
newPrefix.Add("CalamityMod/Prefixes/PointyWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/SharpWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/FeatheredWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/SleekWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/HeftyWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/MightyWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/GloriousWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/SerratedWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/ViciousWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/LethalWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/FlawlessWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/RadicalWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/BluntWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/FlimsyWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/UnbalancedWeaponPrefix", 1);
|
||||
newPrefix.Add("CalamityMod/Prefixes/AtrociousWeaponPrefix", 1);
|
||||
return ModContent.Find<RogueWeaponPrefix>(newPrefix.Get()).Type;
|
||||
}
|
||||
|
||||
public override bool NewPreReforge()
|
||||
public override bool PreReforge()
|
||||
{
|
||||
StealthStrikePrefixBonus = 1f;
|
||||
return true;
|
||||
@@ -79,21 +80,21 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
// Add both the player's dedicated rogue damage and stealth strike damage as applicable.
|
||||
// Rogue weapons are internally throwing so they already benefit from throwing damage boosts.
|
||||
// 5E-06 to prevent downrounding is not needed anymore, added by TML itself
|
||||
public sealed override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
|
||||
public sealed override void ModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat)
|
||||
{
|
||||
CalamityPlayer mp = player.Calamity();
|
||||
|
||||
SafeModifyWeaponDamage(player, ref add, ref mult, ref flat);
|
||||
SafeModifyWeaponDamage(player, ref damage, ref flat);
|
||||
|
||||
// Both regular rogue damage stat and stealth damage are added to the weapon simultaneously.
|
||||
add += mp.throwingDamage + mp.stealthDamage - 1f;
|
||||
damage += mp.throwingDamage + mp.stealthDamage - 1f;
|
||||
|
||||
// Boost (or lower) the weapon's damage if it has a stealth strike available and an associated prefix
|
||||
if (mp.StealthStrikeAvailable() && Item.prefix > 0)
|
||||
mult += StealthStrikePrefixBonus - 1f;
|
||||
damage *= StealthStrikePrefixBonus;
|
||||
}
|
||||
|
||||
public virtual void SafeModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) { }
|
||||
public virtual void SafeModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat) { }
|
||||
|
||||
// Simply add the player's dedicated rogue crit chance.
|
||||
// Rogue crit isn't boosted by Calamity universal crit boosts, so this won't double-add universal crit.
|
||||
@@ -138,7 +139,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
string restOfTooltip = text.Substring(damageNumberSubstringIndex);
|
||||
int damageWithStealth = int.Parse(text.Substring(0, damageNumberSubstringIndex));
|
||||
|
||||
int damageWithoutStealth = (int)(Item.damage * (p.GetDamage<GenericDamageClass>() + p.GetDamage(DamageClass.Throwing) + mp.throwingDamage - 2f));
|
||||
int damageWithoutStealth = (int)(Item.damage * (p.GetDamage<GenericDamageClass>().Additive + p.GetDamage(DamageClass.Throwing).Additive + mp.throwingDamage - 2f));
|
||||
text = damageWithoutStealth + restOfTooltip + " : " + damageWithStealth + " stealth strike damage";
|
||||
}
|
||||
}
|
||||
@@ -156,8 +157,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
string txt = (badModifier ? "-" : "+") + Math.Round(Math.Abs(ssDmgBoost) * 100f) + "% stealth strike damage";
|
||||
TooltipLine stealthTooltip = new TooltipLine(Mod, "PrefixSSDmg", txt)
|
||||
{
|
||||
isModifier = true,
|
||||
isModifierBad = badModifier
|
||||
IsModifier = true,
|
||||
IsModifierBad = badModifier
|
||||
};
|
||||
tooltips.Add(stealthTooltip);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,6 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
NPC.netAlways = true;
|
||||
NPC.boss = true;
|
||||
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
|
||||
bossBag = ModContent.ItemType<DraedonTreasureBag>();
|
||||
NPC.Calamity().VulnerableToSickness = false;
|
||||
NPC.Calamity().VulnerableToElectricity = true;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,6 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
NPC.boss = true;
|
||||
NPC.chaseable = false;
|
||||
Music = CalamityMod.Instance.GetMusicFromMusicMod("ExoMechs") ?? MusicID.Boss3;
|
||||
bossBag = ModContent.ItemType<DraedonTreasureBag>();
|
||||
NPC.Calamity().VulnerableToSickness = false;
|
||||
NPC.Calamity().VulnerableToElectricity = true;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
{
|
||||
int closestPlayer = Player.FindClosest(NPC.Center, 1, 1);
|
||||
if (Main.rand.Next(4) == 0 && Main.player[closestPlayer].statLife < Main.player[closestPlayer].statLifeMax2)
|
||||
Item.NewItem((int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height, ItemID.Heart);
|
||||
Item.NewItem(NPC.GetItemSource_Loot(), (int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height, ItemID.Heart);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
NPC.boss = true;
|
||||
NPC.netAlways = true;
|
||||
Music = CalamityMod.Instance.GetMusicFromMusicMod("LeviathanAndAnahita") ?? MusicID.Boss3;
|
||||
bossBag = ModContent.ItemType<LeviathanBag>();
|
||||
NPC.Calamity().VulnerableToHeat = false;
|
||||
NPC.Calamity().VulnerableToSickness = true;
|
||||
NPC.Calamity().VulnerableToElectricity = true;
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
return 0f;
|
||||
|
||||
// Spawn less frequently in the inner third of the world.
|
||||
if (spawnInfo.playerFloorX > Main.maxTilesX * 0.333f && spawnInfo.playerFloorX < Main.maxTilesX - Main.maxTilesX * 0.333f)
|
||||
if (spawnInfo.PlayerFloorX > Main.maxTilesX * 0.333f && spawnInfo.PlayerFloorX < Main.maxTilesX - Main.maxTilesX * 0.333f)
|
||||
return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.01f : 0.06f) * pylonMult;
|
||||
|
||||
return SpawnCondition.OverworldDaySlime.Chance * (Main.hardMode ? 0.033f : 0.15f) * pylonMult;
|
||||
|
||||
@@ -78,7 +78,6 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
Music = CalamityMod.Instance.GetMusicFromMusicMod("Polterghast") ?? MusicID.Plantera;
|
||||
NPC.HitSound = SoundID.NPCHit7;
|
||||
NPC.DeathSound = SoundID.NPCDeath39;
|
||||
bossBag = ModContent.ItemType<PolterghastBag>();
|
||||
NPC.Calamity().VulnerableToSickness = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
NPC.noGravity = true;
|
||||
NPC.noTileCollide = true;
|
||||
NPC.netAlways = true;
|
||||
bossBag = ModContent.ItemType<StormWeaverBag>();
|
||||
|
||||
if (CalamityWorld.malice || BossRushEvent.BossRushActive)
|
||||
NPC.scale = 1.25f;
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
|
||||
if (!Main.LocalPlayer.Calamity().GivenBrimstoneLocus)
|
||||
{
|
||||
Item.NewItem(NPC.GetItemSource_Loot(), NPC, ItemType<BrimstoneLocus>());
|
||||
Item.NewItem(NPC.GetItemSource_Loot(), NPC.Hitbox, ItemType<BrimstoneLocus>());
|
||||
Main.LocalPlayer.Calamity().GivenBrimstoneLocus = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
@@ -164,7 +164,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
}
|
||||
|
||||
public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough)
|
||||
public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac)
|
||||
{
|
||||
fallThrough = false;
|
||||
return true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.DataStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -90,10 +90,6 @@ namespace CalamityMod.Projectiles.Magic
|
||||
int frameHeight = height * Projectile.frame;
|
||||
Rectangle rectangle = new Rectangle(0, frameHeight, texture.Width, height);
|
||||
Vector2 origin = new Vector2(texture.Width / 2f, height / 2f);
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(texture, drawPos, new Microsoft.Xna.Framework.Rectangle?(rectangle), lightColor, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
|
||||
// Dust effects
|
||||
|
||||
@@ -265,11 +265,11 @@ namespace CalamityMod.Projectiles.Magic
|
||||
drawPosition -= headTexture.Size() * Projectile.scale * 0.5f;
|
||||
drawPosition += headTextureOrigin * Projectile.scale + new Vector2(0f, 4f + Projectile.gfxOffY);
|
||||
|
||||
Texture2D jawTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/ApotheosisJaw").Valie;
|
||||
Texture2D jawTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/ApotheosisJaw").Value;
|
||||
Vector2 jawOrigin = jawTexture.Size() * 0.5f;
|
||||
|
||||
// Segment drawing.
|
||||
Texture2D bodyTexture = ModContent.Request<Texture2D>("CalamityMod/NPCs/DevourerofGods/DevourerofGodsBodyS").Valie;
|
||||
Texture2D bodyTexture = ModContent.Request<Texture2D>("CalamityMod/NPCs/DevourerofGods/DevourerofGodsBodyS").Value;
|
||||
Texture2D tailTexture = ModContent.Request<Texture2D>("CalamityMod/NPCs/DevourerofGods/DevourerofGodsTailS").Value;
|
||||
|
||||
// Not white to differentiate itself slightly from regular DoG when fighting Boss Rush.
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
||||
if (Projectile.ai[0] == 1f)
|
||||
tex = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/BeamingThornBlossom");
|
||||
tex = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/BeamingThornBlossom").Value;
|
||||
|
||||
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
|
||||
@@ -175,10 +175,6 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
Rectangle rectangle = new Rectangle(0, frameY, texture.Width, frameHeight);
|
||||
Vector2 origin = rectangle.Size() / 2f;
|
||||
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), rectangle, Color.White, rotation, origin, scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -56,9 +56,9 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
DrawBeamWithColor(Main.spriteBatch, new Color(190, 29, 209), Projectile.scale);
|
||||
DrawBeamWithColor(Main.spriteBatch, Color.Lerp(new Color(254, 126, 229), Color.Transparent, 0.35f), Projectile.scale * 0.6f);
|
||||
DrawBeamWithColor(Main.spriteBatch, Color.Lerp(new Color(254, 190, 243), Color.Transparent, 0.35f), Projectile.scale * 0.6f);
|
||||
DrawBeamWithColor(new Color(190, 29, 209), Projectile.scale);
|
||||
DrawBeamWithColor(Color.Lerp(new Color(254, 126, 229), Color.Transparent, 0.35f), Projectile.scale * 0.6f);
|
||||
DrawBeamWithColor(Color.Lerp(new Color(254, 190, 243), Color.Transparent, 0.35f), Projectile.scale * 0.6f);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
if (Projectile.ai[1] == 0f)
|
||||
{
|
||||
Projectile.ai[1] = 1f;
|
||||
Main.harpNote = Projectile.ai[0];
|
||||
Main.musicPitch = Projectile.ai[0];
|
||||
SoundEngine.PlaySound(SoundID.Item26, Projectile.position);
|
||||
}
|
||||
|
||||
|
||||
@@ -99,10 +99,10 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D headTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SlitheringEelProjectile");
|
||||
Texture2D bodyTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SlitheringEelBody");
|
||||
Texture2D bodyTexture2 = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SlitheringEelBody2");
|
||||
Texture2D tailTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SlitheringEelTail");
|
||||
Texture2D headTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SlitheringEelProjectile").Value;
|
||||
Texture2D bodyTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SlitheringEelBody").Value;
|
||||
Texture2D bodyTexture2 = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SlitheringEelBody2").Value;
|
||||
Texture2D tailTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SlitheringEelTail").Value;
|
||||
|
||||
Vector2 drawPosition;
|
||||
lightColor = new Color(255, 255, 255, 127);
|
||||
|
||||
@@ -262,14 +262,14 @@ namespace CalamityMod.Projectiles.Magic
|
||||
int maxFrame = CurrentPower <= LargeMouthPowerLowerBound ? 6 : 9;
|
||||
Vector2 backgroundOffset = Vector2.UnitX * Main.GlobalTimeWrappedHourly * maxFrame * 0.03f;
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D backTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SpiritCongregationBack");
|
||||
Texture2D auraTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SpiritCongregationAura");
|
||||
Texture2D backgroundTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ParticleBackgrounds/GruesomeEminence_Ghost_Layer1");
|
||||
Texture2D backTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SpiritCongregationBack").Value;
|
||||
Texture2D auraTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SpiritCongregationAura").Value;
|
||||
Texture2D backgroundTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ParticleBackgrounds/GruesomeEminence_Ghost_Layer1").Value;
|
||||
if (CurrentPower > LargeMouthPowerLowerBound)
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SpiritCongregationBig");
|
||||
backTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SpiritCongregationBackBig");
|
||||
auraTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SpiritCongregationAuraBig");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SpiritCongregationBig").Value;
|
||||
backTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SpiritCongregationBackBig").Value;
|
||||
auraTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Magic/SpiritCongregationAuraBig").Value;
|
||||
}
|
||||
|
||||
Effect shader = GameShaders.Misc["CalamityMod:BaseFusableParticleEdge"].Shader;
|
||||
@@ -284,7 +284,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
// Draw the outline aura below everything else.
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); ;
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); ;
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
Main.EntitySpriteDraw(auraTexture, drawPosition, frame, auraColor, Projectile.rotation, origin, Projectile.scale, direction, 0);
|
||||
@@ -293,7 +293,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
// Draw the back with the specified shader.
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
|
||||
shader.Parameters["edgeBorderSize"].SetValue(0f);
|
||||
shader.Parameters["borderShouldBeSolid"].SetValue(FusableParticleManager.GetParticleSetByType<GruesomeEminenceParticleSet>().BorderShouldBeSolid);
|
||||
|
||||
@@ -111,21 +111,21 @@ namespace CalamityMod.Projectiles.Magic
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
|
||||
if (Projectile.scale < 1f)
|
||||
{
|
||||
for (int i = 10; i < Projectile.oldPos.Length; i++)
|
||||
{
|
||||
var tentacleShader = GameShaders.Misc["CalamityMod:SubsumingTentacle"];
|
||||
tentacleShader.UseImage("Images/Misc/Perlin");
|
||||
tentacleShader.UseImage0("Images/Misc/Perlin");
|
||||
|
||||
Vector2 drawPos = Projectile.oldPos[i] + ModContent.Request<Texture2D>(Texture).Size() / 2f - Main.screenPosition + Projectile.gfxOffY * Vector2.UnitY;
|
||||
float scale = MathHelper.Lerp(0.05f, 1.3f, i / (float)Projectile.oldPos.Length) * Projectile.scale;
|
||||
scale = MathHelper.Clamp(scale, 0f, 2f);
|
||||
Color color = Projectile.GetAlpha(lightColor) * ((Projectile.oldPos.Length - i) / Projectile.oldPos.Length);
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>(Texture), drawPos, null, color, Projectile.rotation, ModContent.Request<Texture2D>(Texture).Size() / 2f, scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>(Texture).Value, drawPos, null, color, Projectile.rotation, ModContent.Request<Texture2D>(Texture).Size() / 2f, scale, SpriteEffects.None, 0);
|
||||
tentacleShader.UseSaturation(i / (float)Projectile.oldPos.Length); // A "completion ratio" for the shader. Used to make the entire tentacle appear multi-colored.
|
||||
tentacleShader.UseOpacity(1f / Projectile.oldPos.Length); // A "step value" for the shader. Used to give variance in color at each individual segment.
|
||||
tentacleShader.Apply(null);
|
||||
@@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
public override void PostDraw(Color drawColor)
|
||||
{
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/NPCs/AcidRain/WaterLeechGlow"), Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/NPCs/AcidRain/WaterLeechGlow").Value, Projectile.Center - Main.screenPosition, new Rectangle(0, drawStart, texture.Width, height), Color.White, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0);
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -175,7 +175,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
var source = Projectile.GetProjectileSource_FromThis();
|
||||
Projectile blast = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), source, Owner.Center, Main.rand.NextVector2CircularEdge(28, 28), ProjectileType<EonBolt>(), (int)(ArkoftheCosmos.SlashBoltsDamageMultiplier * Projectile.damage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.07f);
|
||||
Projectile blast = Projectile.NewProjectileDirect(source, Owner.Center, Main.rand.NextVector2CircularEdge(28, 28), ProjectileType<EonBolt>(), (int)(ArkoftheCosmos.SlashBoltsDamageMultiplier * Projectile.damage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.07f);
|
||||
{
|
||||
blast.timeLeft = 100;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -184,7 +184,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
float adjustedBlastRotation = Projectile.rotation - MathHelper.PiOver4 * 1.15f * Owner.direction;
|
||||
|
||||
var source = Projectile.GetProjectileSource_FromThis();
|
||||
Projectile blast = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), source, Owner.Center + adjustedBlastRotation.ToRotationVector2() * 10f, adjustedBlastRotation.ToRotationVector2() * 20f, ProjectileType<EonBolt>(), (int)(ArkoftheCosmos.SwirlBoltDamageMultiplier / ArkoftheCosmos.SwirlBoltAmount * Projectile.damage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.05f);
|
||||
Projectile blast = Projectile.NewProjectileDirect(source, Owner.Center + adjustedBlastRotation.ToRotationVector2() * 10f, adjustedBlastRotation.ToRotationVector2() * 20f, ProjectileType<EonBolt>(), (int)(ArkoftheCosmos.SwirlBoltDamageMultiplier / ArkoftheCosmos.SwirlBoltAmount * Projectile.damage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.05f);
|
||||
{
|
||||
blast.timeLeft = 100;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
//Spawn a constellation link
|
||||
|
||||
var source = Projectile.GetProjectileSource_FromThis();
|
||||
Projectile chain = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), source, Owner.Center, Vector2.Zero, ProjectileType<ArkoftheCosmosConstellation>(), (int)(Projectile.damage * ArkoftheCosmos.chainDamageMultiplier), 0, Owner.whoAmI, (int)(Projectile.timeLeft / 2f));
|
||||
Projectile chain = Projectile.NewProjectileDirect(source, Owner.Center, Vector2.Zero, ProjectileType<ArkoftheCosmosConstellation>(), (int)(Projectile.damage * ArkoftheCosmos.chainDamageMultiplier), 0, Owner.whoAmI, (int)(Projectile.timeLeft / 2f));
|
||||
chain.timeLeft = (int)(Projectile.timeLeft / 2f);
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
var source = Projectile.GetProjectileSource_FromThis();
|
||||
Projectile blast = Projectile.NewProjectileDirect(Projectile.GetProjectileSource_FromThis(), source, Projectile.Center + (MathHelper.TwoPi * (i / 3f) + rotationOffset).ToRotationVector2() * 30f, (MathHelper.TwoPi * (i / 3f) + rotationOffset).ToRotationVector2() * 20f, ProjectileType<EonBolt>(), (int)(ArkoftheCosmos.SnapBoltsDamageMultiplier * Projectile.damage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.05f);
|
||||
Projectile blast = Projectile.NewProjectileDirect(source, Projectile.Center + (MathHelper.TwoPi * (i / 3f) + rotationOffset).ToRotationVector2() * 30f, (MathHelper.TwoPi * (i / 3f) + rotationOffset).ToRotationVector2() * 20f, ProjectileType<EonBolt>(), (int)(ArkoftheCosmos.SnapBoltsDamageMultiplier * Projectile.damage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.05f);
|
||||
{
|
||||
blast.timeLeft = 100;
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(tex, drawPos, new Microsoft.Xna.Framework.Rectangle?(rectangle), lightColor, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(tex, drawPos, new Microsoft.Xna.Framework.Rectangle?(rectangle), lightColor, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
color = new Color(255, 255, 255, 100);
|
||||
}
|
||||
Vector2 origin = new Vector2(39f, 46f);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/ExcelsusBlueGlow"), Projectile.Center - Main.screenPosition, null, color, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/ExcelsusBlueGlow").Value, Projectile.Center - Main.screenPosition, null, color, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.maxPenetrate = -1;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.Damage();
|
||||
SoundEngine.PlaySound((int)SoundType.NPCKilled, (int)Projectile.Center.X, (int)Projectile.Center.Y, 52, 0.4f);
|
||||
SoundEngine.PlaySound(SoundID.NPCDeath52, Projectile.Center);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 218, 0f, 0f, 100, default, 1.5f);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
{
|
||||
Vector2 portalSpawnPosition = Main.MouseWorld + Main.rand.NextVector2Unit() * Main.rand.NextFloat(50f, 140f);
|
||||
Vector2 spearVelocity = (Main.MouseWorld - portalSpawnPosition).SafeNormalize(Vector2.UnitY);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.GetItemSource_FromThis(), portalSpawnPosition, spearVelocity, ModContent.ProjectileType<StreamGougePortal>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), portalSpawnPosition, spearVelocity, ModContent.ProjectileType<StreamGougePortal>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
}
|
||||
|
||||
Time++;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
get
|
||||
{
|
||||
Texture2D bladeTexture = TextureAssets.Item[(int)SwordItemID];
|
||||
Texture2D bladeTexture = TextureAssets.Item[(int)SwordItemID].Value;
|
||||
Rectangle bladeFrame = bladeTexture.Frame(1, 1, 0, 0);
|
||||
bool hasMultipleFrames = Main.itemAnimations[(int)SwordItemID] != null;
|
||||
if (hasMultipleFrames)
|
||||
@@ -224,7 +224,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
handTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/TaintedHand2").Value;
|
||||
handDirection = SpriteEffects.FlipHorizontally;
|
||||
}
|
||||
Texture2D bladeTexture = TextureAssets.Item[(int)SwordItemID];
|
||||
Texture2D bladeTexture = TextureAssets.Item[(int)SwordItemID].Value;
|
||||
|
||||
// Draw the arms.
|
||||
float backArmRotation = Owner.AngleTo(BackArmAimPosition);
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
//If we swapped out the main attunement for the second one despite the second attunement being empty at the time, unswap them.
|
||||
if ((associatedItem.ModItem as OmegaBiomeBlade).mainAttunement == null && (associatedItem.ModItem as OmegaBiomeBlade).secondaryAttunement != null)
|
||||
{
|
||||
(associatedItem.ModItem as OmegaBiomeBlade).mainAttunement = (associatedItem.modItem as OmegaBiomeBlade).secondaryAttunement;
|
||||
(associatedItem.ModItem as OmegaBiomeBlade).mainAttunement = (associatedItem.ModItem as OmegaBiomeBlade).secondaryAttunement;
|
||||
(associatedItem.ModItem as OmegaBiomeBlade).secondaryAttunement = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
bool canShoot = true;
|
||||
int damage = 0;
|
||||
float kb = 0f;
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, true);
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, out _, true);
|
||||
int blastRadius = 0;
|
||||
if (projID == ProjectileID.RocketII)
|
||||
blastRadius = 3;
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
float kback = player.ActiveItem().knockBack;
|
||||
if (canShoot)
|
||||
{
|
||||
player.PickAmmo(player.ActiveItem(), ref projType, ref speedMult, ref canShoot, ref damage, ref kback);
|
||||
player.PickAmmo(player.ActiveItem(), ref projType, ref speedMult, ref canShoot, ref damage, ref kback, out _);
|
||||
kback = player.GetWeaponKnockback(player.ActiveItem(), kback);
|
||||
float speed = player.ActiveItem().shootSpeed * Projectile.scale;
|
||||
Vector2 targetPos = Main.screenPosition + new Vector2((float)Main.mouseX, (float)Main.mouseY) - source;
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (FreeShotLoaded > 0)
|
||||
FreeShotLoaded--;
|
||||
else
|
||||
player.PickAmmo(player.ActiveItem(), ref projType, ref speedMult2, ref canShoot, ref dmg, ref kBack, false);
|
||||
player.PickAmmo(player.ActiveItem(), ref projType, ref speedMult2, ref canShoot, ref dmg, ref kBack, out _);
|
||||
|
||||
projType = ModContent.ProjectileType<ChickenRocket>();
|
||||
kBack = player.GetWeaponKnockback(player.ActiveItem(), kBack);
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
bool uselessFuckYou = OwnerCanShoot;
|
||||
int projectileType = 0;
|
||||
Owner.PickAmmo(heldItem, ref projectileType, ref shootSpeed, ref uselessFuckYou, ref arrowDamage, ref knockback, false);
|
||||
Owner.PickAmmo(heldItem, ref projectileType, ref shootSpeed, ref uselessFuckYou, ref arrowDamage, ref knockback, out _);
|
||||
projectileType = ModContent.ProjectileType<CondemnationArrow>();
|
||||
|
||||
knockback = Owner.GetWeaponKnockback(heldItem, knockback);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -68,10 +68,10 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
|
||||
case 2f:
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/DWArrow2");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/DWArrow2").Value;
|
||||
break;
|
||||
default:
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/DWArrow");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/DWArrow").Value;
|
||||
break;
|
||||
}
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
float weaponKnockback2 = player.ActiveItem().knockBack;
|
||||
if (flag16)
|
||||
{
|
||||
player.PickAmmo(player.ActiveItem(), ref num42, ref scaleFactor11, ref flag16, ref weaponDamage2, ref weaponKnockback2, false);
|
||||
player.PickAmmo(player.ActiveItem(), ref num42, ref scaleFactor11, ref flag16, ref weaponDamage2, ref weaponKnockback2, out _);
|
||||
weaponKnockback2 = player.GetWeaponKnockback(player.ActiveItem(), weaponKnockback2);
|
||||
float scaleFactor12 = player.ActiveItem().shootSpeed * Projectile.scale;
|
||||
Vector2 vector19 = vector;
|
||||
@@ -163,7 +163,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/DaemonsFlameBowGlow"), Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/DaemonsFlameBowGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
public override bool? CanDamage() => false;
|
||||
|
||||
@@ -143,11 +143,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Color color25 = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0));
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
}
|
||||
Vector2 vector38 = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Texture2D texture2D27 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Rectangle rectangle11 = texture2D27.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
int damage = player.GetWeaponDamage(player.ActiveItem());
|
||||
float knockBack = player.ActiveItem().knockBack;
|
||||
|
||||
player.PickAmmo(player.ActiveItem(), ref type, ref scaleFactor, ref canFire, ref damage, ref knockBack, false);
|
||||
player.PickAmmo(player.ActiveItem(), ref type, ref scaleFactor, ref canFire, ref damage, ref knockBack, out _);
|
||||
|
||||
type = ModContent.ProjectileType<DrataliornusFlame>();
|
||||
knockBack = player.GetWeaponKnockback(player.ActiveItem(), knockBack);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
//Changes the texture of the projectile
|
||||
if (Projectile.ai[1] == 1f)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/DrizzlefishFire2");
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/DrizzlefishFire2").Value;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, 16, 16)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, 20 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D lightTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/PhotovisceratorLight");
|
||||
Texture2D lightTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/PhotovisceratorLight").Value;
|
||||
for (int i = 0; i < Projectile.oldPos.Length; i++)
|
||||
{
|
||||
float colorInterpolation = (float)Math.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f;
|
||||
|
||||
@@ -138,11 +138,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Color color25 = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0));
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
}
|
||||
Vector2 vector38 = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Texture2D texture2D27 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Rectangle rectangle11 = texture2D27.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ItemID.Stake);
|
||||
Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ItemID.Stake);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Vector2 spriteOrigin = spriteRec.Size() / 2f;
|
||||
SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
|
||||
Texture2D aura = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/FallenStarAura");
|
||||
Texture2D aura = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/FallenStarAura").Value;
|
||||
Vector2 drawStart = Projectile.Center + Projectile.velocity;
|
||||
Vector2 drawStart2 = Projectile.Center - Projectile.velocity * 0.5f;
|
||||
Vector2 spinPoint = new Vector2(0f, -10f);
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ItemID.Stake);
|
||||
Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ItemID.Stake);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
float kBack = player.ActiveItem().knockBack;
|
||||
if (canShoot)
|
||||
{
|
||||
player.PickAmmo(player.ActiveItem(), ref projType, ref speedMult2, ref canShoot, ref dmg, ref kBack, false);
|
||||
player.PickAmmo(player.ActiveItem(), ref projType, ref speedMult2, ref canShoot, ref dmg, ref kBack, out _);
|
||||
kBack = player.GetWeaponKnockback(player.ActiveItem(), kBack);
|
||||
float shootSpeed = player.ActiveItem().shootSpeed * Projectile.scale;
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
bool canShoot = true;
|
||||
int damage = 0;
|
||||
float kb = 0f;
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, true);
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, out _, true);
|
||||
int blastRadius = 0;
|
||||
if (projID == ProjectileID.RocketII)
|
||||
blastRadius = 6;
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
bool canShoot = true;
|
||||
int damage = 0;
|
||||
float kb = 0f;
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, true);
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, out _, true);
|
||||
int blastRadius = 0;
|
||||
if (projID == ProjectileID.RocketII)
|
||||
blastRadius = 4;
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
bool canShoot = true;
|
||||
int damage = 0;
|
||||
float kb = 0f;
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, true);
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, out _, true);
|
||||
int blastRadius = 0;
|
||||
if (projID == ProjectileID.RocketII)
|
||||
blastRadius = 5;
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
int boom = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<FuckYou>(), blastDamage, Projectile.knockBack, Projectile.owner, 0f, scale);
|
||||
|
||||
// Only declare the explosion as ranged class if the bullet itself is ranged class.
|
||||
if (boom.WithinBounds(Main.maxProjectiles) && Projectile.ranged)
|
||||
if (boom.WithinBounds(Main.maxProjectiles) && Projectile.CountsAsClass(DamageClass.Ranged))
|
||||
Main.projectile[boom].Calamity().forceRanged = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
bool uselessFuckYou = OwnerCanShoot;
|
||||
int projectileType = 0;
|
||||
Owner.PickAmmo(heldItem, ref projectileType, ref shootSpeed, ref uselessFuckYou, ref arrowDamage, ref knockback, false);
|
||||
Owner.PickAmmo(heldItem, ref projectileType, ref shootSpeed, ref uselessFuckYou, ref arrowDamage, ref knockback, out _);
|
||||
projectileType = ModContent.ProjectileType<TheMaelstromShark>();
|
||||
|
||||
knockback = Owner.GetWeaponKnockback(heldItem, knockback);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
bool canShoot = true;
|
||||
int damage = 0;
|
||||
float kb = 0f;
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, true);
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, out _, true);
|
||||
int blastRadius = 0;
|
||||
if (projID == ProjectileID.RocketII)
|
||||
blastRadius = 3;
|
||||
|
||||
@@ -34,9 +34,9 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Projectile.localAI[1] == 0)
|
||||
Projectile.localAI[1] = Main.rand.Next(1, 3);
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/Nanomachine");
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/Nanomachine").Value;
|
||||
if (Projectile.localAI[1] == 2)
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/Nanomachine2");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/Nanomachine2").Value;
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, texture);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
bool canShoot = true;
|
||||
int damage = 0;
|
||||
float kb = 0f;
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, true);
|
||||
player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, out _, true);
|
||||
int blastRadius = 0;
|
||||
if (projID == ProjectileID.RocketII)
|
||||
blastRadius = 6;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
float weaponKnockback2 = player.ActiveItem().knockBack;
|
||||
if (flag16)
|
||||
{
|
||||
player.PickAmmo(player.ActiveItem(), ref num42, ref scaleFactor11, ref flag16, ref weaponDamage2, ref weaponKnockback2, false);
|
||||
player.PickAmmo(player.ActiveItem(), ref num42, ref scaleFactor11, ref flag16, ref weaponDamage2, ref weaponKnockback2, out _);
|
||||
weaponKnockback2 = player.GetWeaponKnockback(player.ActiveItem(), weaponKnockback2);
|
||||
float scaleFactor12 = player.ActiveItem().shootSpeed * Projectile.scale;
|
||||
Vector2 vector19 = vector;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D lightTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/PhotovisceratorLight");
|
||||
Texture2D lightTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/PhotovisceratorLight").Value;
|
||||
Rectangle frame = texture.Frame(3, 6, Projectile.frame / 6, Projectile.frame % 6);
|
||||
Vector2 drawPosition = Projectile.Center - Main.screenPosition;
|
||||
Vector2 origin = frame.Size() * 0.5f;
|
||||
|
||||
@@ -85,8 +85,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D baseTexture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D glowTexture = ModContent.Request<Texture2D>($"{Texture}Glowmask");
|
||||
Texture2D laserTexture = ModContent.Request<Texture2D>($"CalamityMod/Projectiles/Ranged/PrismMineArc");
|
||||
Texture2D glowTexture = ModContent.Request<Texture2D>($"{Texture}Glowmask").Value;
|
||||
Texture2D laserTexture = ModContent.Request<Texture2D>($"CalamityMod/Projectiles/Ranged/PrismMineArc").Value;
|
||||
|
||||
void drawLineTo(Vector2 destination, Color laserColor)
|
||||
{
|
||||
|
||||
@@ -19,9 +19,9 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override float Lifetime => 50f;
|
||||
public override Color LaserOverlayColor => Color.White;
|
||||
public override Color LightCastColor => LaserOverlayColor;
|
||||
public override Texture2D LaserBeginTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/PrismLaserStart");
|
||||
public override Texture2D LaserMiddleTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/PrismLaserMid");
|
||||
public override Texture2D LaserEndTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/PrismLaserEnd");
|
||||
public override Texture2D LaserBeginTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/PrismLaserStart").Value;
|
||||
public override Texture2D LaserMiddleTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/PrismLaserMid").Value;
|
||||
public override Texture2D LaserEndTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/PrismLaserEnd").Value;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Vector2 origin = new Vector2(spriteWidth / 2, spriteHeight / 2);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Rogue/ShockGrenadeGlow"), Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Rogue/ShockGrenadeGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
modifiedMoneyValue /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
moneyValueToDrop -= 10000 * modifiedMoneyValue;
|
||||
DropHelper.DropItem(target, ItemID.GoldCoin, modifiedMoneyValue);
|
||||
Item.NewItem(target.GetItemSource_Loot(), target.Hitbox, ItemID.GoldCoin, modifiedMoneyValue);
|
||||
}
|
||||
while (moneyValueToDrop > 100f)
|
||||
{
|
||||
@@ -112,7 +112,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
modifiedMoneyValue /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
moneyValueToDrop -= 100 * modifiedMoneyValue;
|
||||
DropHelper.DropItem(target, ItemID.SilverCoin, modifiedMoneyValue);
|
||||
Item.NewItem(target.GetItemSource_Loot(), target.Hitbox, ItemID.SilverCoin, modifiedMoneyValue);
|
||||
}
|
||||
while (moneyValueToDrop > 0f)
|
||||
{
|
||||
@@ -130,7 +130,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
modifiedMoneyValue = 1;
|
||||
}
|
||||
moneyValueToDrop -= modifiedMoneyValue;
|
||||
DropHelper.DropItem(target, ItemID.CopperCoin, modifiedMoneyValue);
|
||||
Item.NewItem(target.GetItemSource_Loot(), target.Hitbox, ItemID.CopperCoin, modifiedMoneyValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Projectile.Calamity().stealthStrike)
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Rogue/SpearofDestinyGlow");
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Rogue/SpearofDestinyGlow").Value;
|
||||
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, tex.Size() / 2, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
if (Projectile.ai[0] == 1f)
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Rogue/StealthNimbus2");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Rogue/StealthNimbus2").Value;
|
||||
int height = texture.Height / Main.projFrames[Projectile.type];
|
||||
int frameHeight = height * Projectile.frame;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
//Changes the texture of the projectile
|
||||
if (Projectile.ai[0] == 1f)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Rogue/StealthRain2");
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Rogue/StealthRain2").Value;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Rectangle frame = new Rectangle(frameX * Projectile.width, frameY * Projectile.height, Projectile.width, Projectile.height);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Rogue/SulphuricNukesplosion"), Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Rogue/SulphuricNukesplosion").Value, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
((Projectile.friendly && (!npc.friendly || (npc.type == NPCID.Guide && Projectile.owner < Main.maxPlayers && player.killGuide) || (npc.type == NPCID.Clothier && Projectile.owner < Main.maxPlayers && player.killClothier))) ||
|
||||
(Projectile.hostile && npc.friendly && !npc.dontTakeDamageFromHostiles)) && (Projectile.owner < 0 || npc.immune[Projectile.owner] == 0 || Projectile.maxPenetrate == 1))
|
||||
{
|
||||
if (npc.noTileCollide || !Projectile.ownerHitCheck || Projectile.CanHit(npc))
|
||||
if (npc.noTileCollide || !Projectile.ownerHitCheck)
|
||||
{
|
||||
bool stickingToNPC;
|
||||
//Solar Crawltipede tail has special collision
|
||||
@@ -372,9 +372,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
if (stickingToNPC)
|
||||
{
|
||||
//reflect projectile if the npc can reflect it (like Selenians)
|
||||
if (npc.reflectingProjectiles && Projectile.CanReflect())
|
||||
if (npc.reflectsProjectiles && Projectile.CanBeReflected())
|
||||
{
|
||||
npc.ReflectProjectile(Projectile.whoAmI);
|
||||
npc.ReflectProjectile(Projectile);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
((Projectile.friendly && (!npc.friendly || (npc.type == NPCID.Guide && Projectile.owner < Main.maxPlayers && player.killGuide) || (npc.type == NPCID.Clothier && Projectile.owner < Main.maxPlayers && player.killClothier))) ||
|
||||
(Projectile.hostile && npc.friendly && !npc.dontTakeDamageFromHostiles)) && (Projectile.owner < 0 || npc.immune[Projectile.owner] == 0 || Projectile.maxPenetrate == 1))
|
||||
{
|
||||
if (npc.noTileCollide || !Projectile.ownerHitCheck || Projectile.CanHit(npc))
|
||||
if (npc.noTileCollide || !Projectile.ownerHitCheck)
|
||||
{
|
||||
bool stickingToNPC;
|
||||
//Solar Crawltipede tail has special collision
|
||||
@@ -207,9 +207,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
if (stickingToNPC)
|
||||
{
|
||||
//reflect projectile if the npc can reflect it (like Selenians)
|
||||
if (npc.reflectingProjectiles && Projectile.CanReflect())
|
||||
if (npc.reflectsProjectiles && Projectile.CanBeReflected())
|
||||
{
|
||||
npc.ReflectProjectile(Projectile.whoAmI);
|
||||
npc.ReflectProjectile(Projectile);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -156,8 +156,6 @@ namespace CalamityMod.Schematics
|
||||
for (int j = area.Top; j < area.Bottom; j++)
|
||||
{
|
||||
Tile t = Main.tile[i, j];
|
||||
if (t is null) // Vanilla does this itself all the time. I wish it weren't necessary.
|
||||
t = new Tile();
|
||||
tiles[i - area.Left, j - area.Top] = t;
|
||||
}
|
||||
return tiles;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
{
|
||||
int xFrameOffset = Main.tile[i, j].TileFrameX;
|
||||
int yFrameOffset = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedLaboratoryConsoleGlow");
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonStructures/AgedLaboratoryConsoleGlow").Value;
|
||||
Vector2 drawOffest = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest;
|
||||
Color drawColour = Color.White;
|
||||
|
||||
Loaded 100 of 103 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user