added aurora blazer

This commit is contained in:
termigator1359 committed 2020-05-14 17:12:14 -04:00
1 parent aef328a53d
commit 1fc11f4fa1
11 files changed
+160 -6

No files matched your search

+6 -1
View File
@@ -8354,7 +8354,7 @@ namespace CalamityMod.CalPlayer
// Bow and Book
else if (item.type == ModContent.ItemType<Deathwind>() || item.type == ModContent.ItemType<Apotheosis>() || item.type == ModContent.ItemType<CleansingBlaze>() ||
item.type == ModContent.ItemType<SubsumingVortex>())
item.type == ModContent.ItemType<SubsumingVortex>() || item.type == ModContent.ItemType<AuroraBlazer>())
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Ranged/DeathwindGlow");
int offsetX = 10;
@@ -8373,6 +8373,11 @@ namespace CalamityMod.CalPlayer
texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/SubsumingVortexGlow");
offsetX = 9;
}
else if (item.type == ModContent.ItemType<AuroraBlazer>())
{
texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Ranged/AuroraBlazerGlow");
offsetX = 44;
}
Vector2 vector13 = new Vector2((float)(Main.itemTexture[item.type].Width / 2), (float)(Main.itemTexture[item.type].Height / 2));
Vector2 vector14 = vector13;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 185 B

+3 -4
View File
@@ -5,6 +5,7 @@ using CalamityMod.Items.Mounts;
using CalamityMod.Items.PermanentBoosters;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.NPCs.AstrumAureus;
using CalamityMod.World;
@@ -34,10 +35,7 @@ namespace CalamityMod.Items.TreasureBags
item.rare = 9;
}
public override bool CanRightClick()
{
return true;
}
public override bool CanRightClick() => true;
public override void OpenBossBag(Player player)
{
@@ -50,6 +48,7 @@ namespace CalamityMod.Items.TreasureBags
// Weapons
DropHelper.DropItemChance(player, ModContent.ItemType<Nebulash>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<AuroraBlazer>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<BorealisBomber>(), 3);
// Equipment
+59
View File
@@ -0,0 +1,59 @@
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Ranged
{
public class AuroraBlazer : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Aurora Blazer");
Tooltip.SetDefault("Spews astral flames that travel in a star-shaped patterns\n" +
"60% chance to not consume gel");
}
public override void SetDefaults()
{
item.damage = 101;
item.ranged = true;
item.useTime = 15;
item.useAnimation = 15;
item.knockBack = 2f;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<AuroraFire>();
item.shootSpeed = 7.5f;
item.useAmmo = AmmoID.Gel;
item.width = 68;
item.height = 36;
item.useStyle = 5;
item.noMelee = true;
item.UseSound = SoundID.Item34;
item.value = CalamityGlobalItem.Rarity7BuyPrice;
item.rare = 7;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
float SpeedX = speedX + Main.rand.NextFloat(-15f, 15f) * 0.05f;
float SpeedY = speedY + Main.rand.NextFloat(-15f, 15f) * 0.05f;
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, Main.rand.Next(4, 11), 0f);
return false;
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
Texture2D glowmask = ModContent.GetTexture("CalamityMod/Items/Weapons/Ranged/AuroraBlazerGlow");
Vector2 origin = new Vector2(glowmask.Width / 2f, glowmask.Height / 2f - 2f);
spriteBatch.Draw(glowmask, item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f);
}
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
public override bool ConsumeAmmo(Player player) => Main.rand.Next(100) >= 60;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

+1 -1
View File
@@ -357,7 +357,7 @@ namespace CalamityMod
BossDifficulty.TryGetValue("AstrumAureus", out float order);
int type = NPCType<AstrumAureus>();
int summon = ItemType<AstralChunk>();
List<int> loot = new List<int>() { ItemType<AstrageldonBag>(), ItemType<Stardust>(), ItemID.FallenStar, ItemType<Nebulash>(), ItemType<BorealisBomber>(), ItemType<GravistarSabaton>(), ItemType<AstralJelly>(), ItemID.HallowedKey, ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ItemType<StarlightFuelCell>(), ItemID.GreaterHealingPotion };
List<int> loot = new List<int>() { ItemType<AstrageldonBag>(), ItemType<Stardust>(), ItemID.FallenStar, ItemType<Nebulash>(), ItemType<AuroraBlazer>(),ItemType<BorealisBomber>(), ItemType<GravistarSabaton>(), ItemType<AstralJelly>(), ItemID.HallowedKey, ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ItemType<StarlightFuelCell>(), ItemID.GreaterHealingPotion };
List<int> collection = new List<int>() { ItemType<AstrageldonTrophy>(), ItemType<AureusMask>(), ItemType<KnowledgeAstrumAureus>() };
string instructions = $"Use an [i:{summon}] at Night in the Astral Biome";
string despawn = CalamityUtils.ColorMessage("Astrum Aureus’ program has been executed. Initiate recall.", new Color(0xFF, 0xD7, 0x00));
+2
View File
@@ -8,6 +8,7 @@ using CalamityMod.Items.Placeables.Furniture.Trophies;
using CalamityMod.Items.Potions;
using CalamityMod.Items.TreasureBags;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.NPCs.TownNPCs;
using CalamityMod.World;
@@ -357,6 +358,7 @@ namespace CalamityMod.NPCs.AstrumAureus
// Weapons
DropHelper.DropItemChance(npc, ModContent.ItemType<Nebulash>(), 4);
DropHelper.DropItemChance(npc, ModContent.ItemType<AuroraBlazer>(), 4);
DropHelper.DropItemChance(npc, ModContent.ItemType<BorealisBomber>(), 4);
// Vanity
+89
View File
@@ -0,0 +1,89 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
{
public class AuroraFire : ModProjectile
{
private const int framesBeforeTurning = 70;
private bool initialized = false;
private int radianAmt = 0;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Aurora");
}
public override void SetDefaults()
{
projectile.width = 12;
projectile.height = 12;
projectile.friendly = true;
projectile.ignoreWater = true;
projectile.ranged = true;
projectile.penetrate = -1;
projectile.extraUpdates = 3;
projectile.tileCollide = false;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 8;
}
public override void AI()
{
if (projectile.ai[0] % 2 == 0)
projectile.ai[0]++;
if (!initialized)
{
int pointCount = (int)projectile.ai[0];
radianAmt = 180 + (int)(360 / (pointCount * 2));
projectile.timeLeft = framesBeforeTurning * pointCount - 1;
initialized = true;
}
//Velocity movement
projectile.localAI[1]++;
if (projectile.localAI[1] % framesBeforeTurning == 0)
{
projectile.velocity = projectile.velocity.RotatedBy(MathHelper.ToRadians(radianAmt));
}
//Dust behavior
projectile.localAI[0] += 1f;
if (projectile.localAI[0] > 4f)
{
int dustType = Utils.SelectRandom(Main.rand, new int[]
{
ModContent.DustType<AstralBlue>(),
ModContent.DustType<AstralOrange>()
});
for (int i = 0; i < 5; i++)
{
int astral = Dust.NewDust(projectile.position, projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 0.8f);
Dust dust = Main.dust[astral];
dust.noGravity = true;
dust.velocity *= 0f;
dust.scale *= Main.rand.NextFloat();
}
}
//rotation code for when sproot
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 240);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 240);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B