added polaris parrotfish
also fixed sanguine flare holdout origin lol probably should do other wands
This commit is contained in:
1 parent
cc510d291e
commit
5d2b347d1e
6 files changed
+152
-4
No files matched your search
@@ -6906,18 +6906,22 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
caughtType = mod.ItemType("AstralCrate");
|
||||
}
|
||||
else if (Main.rand.NextBool(10))
|
||||
else if (!player.cratePotion && Main.rand.NextBool(10))
|
||||
{
|
||||
caughtType = mod.ItemType("AstralCrate");
|
||||
}
|
||||
else if (Main.rand.NextBool(25))
|
||||
else if (Main.rand.NextBool(15))
|
||||
{
|
||||
caughtType = mod.ItemType("UrsaSergeant");
|
||||
}
|
||||
else if (Main.rand.NextBool(25))
|
||||
else if (Main.rand.NextBool(15))
|
||||
{
|
||||
caughtType = mod.ItemType("GacruxianMollusk");
|
||||
}
|
||||
else if (Main.rand.NextBool(15))
|
||||
{
|
||||
caughtType = mod.ItemType("PolarisParrotfish");
|
||||
}
|
||||
else
|
||||
{
|
||||
caughtType = mod.ItemType("TwinklingPollox");
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Fishing
|
||||
{
|
||||
public class PolarisParrotfish : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Polaris Parrotfish");
|
||||
Tooltip.SetDefault("It carries the mark of the Northern Star");
|
||||
Item.staff[item.type] = true; //so it doesn't look weird af when holding it
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 40;
|
||||
item.ranged = true;
|
||||
item.width = 38;
|
||||
item.height = 34;
|
||||
item.useTime = 20;
|
||||
item.useAnimation = 20;
|
||||
item.useStyle = 5;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 2.25f;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"); //pew pew
|
||||
item.autoReuse = true;
|
||||
item.shoot = mod.ProjectileType("PolarStar");
|
||||
item.shootSpeed = 15f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOrigin()
|
||||
{
|
||||
return new Vector2(10, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons
|
||||
item.Calamity().postMoonLordRarity = 13;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOrigin()
|
||||
{
|
||||
return new Vector2(15, 15);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int num6 = Main.rand.Next(6, 9);
|
||||
|
||||
@@ -520,7 +520,7 @@ namespace CalamityMod.Projectiles
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (projectile.type == ProjectileID.FallingStar)
|
||||
else if (projectile.type == ProjectileID.FallingStar && Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == ItemID.StarCannon)
|
||||
projectile.ranged = true;
|
||||
else if (projectile.type == ProjectileID.SoulDrain)
|
||||
projectile.magic = true;
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.CalPlayer;
|
||||
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
public class PolarStar : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Polar Star");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 10;
|
||||
projectile.height = 10;
|
||||
projectile.friendly = true;
|
||||
projectile.alpha = 255;
|
||||
projectile.penetrate = 1;
|
||||
projectile.extraUpdates = 1;
|
||||
projectile.timeLeft = 300;
|
||||
projectile.ranged = true;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (projectile.alpha > 0)
|
||||
{
|
||||
projectile.alpha -= 25;
|
||||
}
|
||||
if (projectile.alpha < 0)
|
||||
{
|
||||
projectile.alpha = 0;
|
||||
}
|
||||
float num55 = 40f;
|
||||
float num56 = 1.5f;
|
||||
if (projectile.ai[1] == 0f)
|
||||
{
|
||||
projectile.localAI[0] += num56;
|
||||
if (projectile.localAI[0] > num55)
|
||||
{
|
||||
projectile.localAI[0] = num55;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
projectile.localAI[0] -= num56;
|
||||
if (projectile.localAI[0] <= 0f)
|
||||
{
|
||||
projectile.Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
return new Color(255, 255, 255, projectile.alpha);
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
Microsoft.Xna.Framework.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));
|
||||
int num147 = 0;
|
||||
int num148 = 0;
|
||||
float num149 = (float)(Main.projectileTexture[projectile.type].Width - projectile.width) * 0.5f + (float)projectile.width * 0.5f;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (projectile.spriteDirection == -1)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
}
|
||||
Microsoft.Xna.Framework.Rectangle value6 = new Microsoft.Xna.Framework.Rectangle((int)Main.screenPosition.X - 500, (int)Main.screenPosition.Y - 500, Main.screenWidth + 1000, Main.screenHeight + 1000);
|
||||
if (projectile.getRect().Intersects(value6))
|
||||
{
|
||||
Vector2 value7 = new Vector2(projectile.position.X - Main.screenPosition.X + num149 + (float)num148, projectile.position.Y - Main.screenPosition.Y + (float)(projectile.height / 2) + projectile.gfxOffY);
|
||||
float num162 = 40f;
|
||||
float scaleFactor = 1.5f;
|
||||
if (projectile.ai[1] == 1f)
|
||||
{
|
||||
num162 = (float)(int)projectile.localAI[0];
|
||||
}
|
||||
for (int num163 = 1; num163 <= (int)projectile.localAI[0]; num163++)
|
||||
{
|
||||
Vector2 value8 = Vector2.Normalize(projectile.velocity) * (float)num163 * scaleFactor;
|
||||
Microsoft.Xna.Framework.Color color29 = projectile.GetAlpha(color25);
|
||||
color29 *= (num162 - (float)num163) / num162;
|
||||
color29.A = 0;
|
||||
Main.spriteBatch.Draw(Main.projectileTexture[projectile.type], value7 - value8, null, color29, projectile.rotation, new Vector2(num149, (float)(projectile.height / 2 + num147)), projectile.scale, spriteEffects, 0f);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 153 B |
Reference in new issue
Block a user