This commit is contained in:
Ozzatron committed 2019-10-08 18:21:38 -04:00
commit 90a3e1bee0
15 files changed
+206 -107

No files matched your search

+6 -16
View File
@@ -305,6 +305,8 @@ namespace CalamityMod.CalPlayer
public bool eclipseMirror = false;
public bool eclipseMirrorCooldown = false;
public bool oldDie = false;
public bool featherCrown = false;
public bool moonCrown = false;
// Armor Set
public bool victideSet = false;
@@ -1012,6 +1014,8 @@ namespace CalamityMod.CalPlayer
abyssalMirrorCooldown = false;
eclipseMirror = false;
eclipseMirrorCooldown = false;
featherCrown = false;
moonCrown = false;
shadowflame = false;
wDeath = false;
@@ -4790,23 +4794,9 @@ namespace CalamityMod.CalPlayer
for (int i = 0; i < 50; i++)
{
//Get which projectile to use
int projType = Main.rand.Next(0, 3);
int lumenylType;
switch (projType)
{
case 0:
lumenylType = mod.ProjectileType("AbyssalMirrorProjectile1");
break;
case 1:
lumenylType = mod.ProjectileType("AbyssalMirrorProjectile2");
break;
default:
lumenylType = mod.ProjectileType("AbyssalMirrorProjectile3");
break;
}
int lumenyl = Projectile.NewProjectile(player.Center.X, player.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), lumenylType, 55, 0, player.whoAmI);
int lumenyl = Projectile.NewProjectile(player.Center.X, player.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), mod.ProjectileType("AbyssalMirrorProjectile"), 55, 0, player.whoAmI);
Main.projectile[lumenyl].rotation = Main.rand.NextFloat(0, 360);
Main.projectile[lumenyl].frame = Main.rand.Next(0, 4);
}
}
}
+51
View File
@@ -0,0 +1,51 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class FeatherCrown : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Feather Crown");
Tooltip.SetDefault("15% increased rogue projectile velocity\n" +
"Stealth strikes cause feathers to fall from the sky on enemy hits");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.value = Item.buyPrice(0, 0, 80, 0);
item.rare = 4;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetModPlayer<CalamityPlayer>(mod);
modPlayer.throwingVelocity += 0.15f;
modPlayer.featherCrown = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.GoldCrown);
recipe.AddIngredient(mod.ItemType("AerialiteBar"), 6);
recipe.AddIngredient(ItemID.Feather, 8);
recipe.AddTile(TileID.SkyMill);
recipe.SetResult(this);
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.PlatinumCrown);
recipe.AddIngredient(mod.ItemType("AerialiteBar"), 6);
recipe.AddIngredient(ItemID.Feather, 8);
recipe.AddTile(TileID.SkyMill);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+45
View File
@@ -0,0 +1,45 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Items.Accessories
{
public class MoonstoneCrown : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Moonstone Crown");
Tooltip.SetDefault("15% increased rogue projectile velocity\n" +
"Stealth strikes summon lunar flares on enemy hits\n" +
"Rogue projectiles very occasionally summon moon sigils behind them");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.value = Item.buyPrice(0, 18, 0, 0);
item.GetGlobalItem<CalamityGlobalItem>(mod).postMoonLordRarity = 12;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.GetModPlayer<CalamityPlayer>(mod);
modPlayer.throwingVelocity += 0.15f;
modPlayer.moonCrown = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType("AerialiteBar"));
recipe.AddIngredient(ItemID.LunarBar, 5);
recipe.AddIngredient(mod.ItemType("GalacticaSingularity"), 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+41 -1
View File
@@ -38,6 +38,9 @@ namespace CalamityMod.Projectiles
public int spawnedPlayerMinionProjectileDamageValue = 0;
public int defDamage = 0;
// Rogue Stuff
public bool stealthStrike = false; //Update all existing rogue weapons with this
// Iron Heart
public int ironHeartDamage = 0;
@@ -528,6 +531,18 @@ namespace CalamityMod.Projectiles
int dust = Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 244, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f, 0, default, 0.5f);
Main.dust[dust].noGravity = true;
}
if (rogue)
{
if (Main.player[projectile.owner].GetCalamityPlayer().moonCrown)
{
//Summon moon sigils infrequently
if (Main.rand.NextBool(300))
{
Projectile.NewProjectile(projectile.position, Vector2.Zero, mod.ProjectileType("MoonSigil"), 10, 0);
}
}
}
}
#endregion
@@ -1095,7 +1110,32 @@ namespace CalamityMod.Projectiles
num9 *= num10;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("XerocStar"), (int)((double)num * 1.6), 0f, projectile.owner, (float)num6, 0f);
}
}
if (Main.player[projectile.owner].GetCalamityPlayer().featherCrown && stealthStrike)
{
for (int i = 0; i < 10; i++)
{
Vector2 pos = new Vector2(target.position.X + (float)target.width * 0.5f + (float)Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
float speedX = (target.position.X - pos.X) / 30f;
float speedY = (target.position.Y - pos.Y) * 8;
int feather = Projectile.NewProjectile(pos.X, pos.Y, speedX, speedY, mod.ProjectileType("StickyFeather"), 15, 3, projectile.owner, 0f, (float)Main.rand.Next(15));
Main.projectile[feather].magic = false;
Main.projectile[feather].GetGlobalProjectile<CalamityGlobalProjectile>(mod).rogue = true;
}
}
if (Main.player[projectile.owner].GetCalamityPlayer().moonCrown && stealthStrike)
{
for (int i = 0; i < 20; i++)
{
Vector2 pos = new Vector2(target.position.X + (float)target.width * 0.5f + (float)Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
Vector2 velocity = (target.position - pos) / 10f;
int flare = Projectile.NewProjectile(pos, velocity, ProjectileID.LunarFlare, 50, 3, projectile.owner);
Main.projectile[flare].magic = false;
Main.projectile[flare].GetGlobalProjectile<CalamityGlobalProjectile>(mod).rogue = true;
}
}
}
else if (projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type))
{
if (Main.player[projectile.owner].GetCalamityPlayer().pArtifact)
@@ -4,17 +4,18 @@ using CalamityMod.CalPlayer;
namespace CalamityMod.Projectiles.Rogue
{
public class AbyssalMirrorProjectile1 : ModProjectile
public class AbyssalMirrorProjectile : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Lumenyl Fluid");
}
Main.projFrames[projectile.type] = 3;
}
public override void SetDefaults()
{
projectile.width = 12;
projectile.height = 12;
projectile.height = 14;
projectile.friendly = true;
projectile.alpha = 0;
projectile.penetrate = -1;
@@ -22,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue
projectile.ignoreWater = true;
projectile.timeLeft = 50;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 2;
projectile.localNPCHitCooldown = -1;
Mod calamity = ModLoader.GetMod("CalamityMod");
projectile.GetGlobalProjectile<CalamityGlobalProjectile>(calamity).rogue = true;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

@@ -1,43 +0,0 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Projectiles.Rogue
{
public class AbyssalMirrorProjectile2 : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Lumenyl Fluid");
}
public override void SetDefaults()
{
projectile.width = 12;
projectile.height = 12;
projectile.friendly = true;
projectile.alpha = 0;
projectile.penetrate = -1;
projectile.tileCollide = true;
projectile.ignoreWater = true;
projectile.timeLeft = 50;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 2;
Mod calamity = ModLoader.GetMod("CalamityMod");
projectile.GetGlobalProjectile<CalamityGlobalProjectile>(calamity).rogue = true;
}
public override void AI()
{
if (projectile.timeLeft < 25) { projectile.alpha += 10; }
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (!target.friendly && target.rarity != 2 && !CalamityPlayer.areThereAnyDamnBosses)
{
target.AddBuff(mod.BuffType("SilvaStun"), 300);
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

@@ -1,43 +0,0 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
namespace CalamityMod.Projectiles.Rogue
{
public class AbyssalMirrorProjectile3 : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Lumenyl Fluid");
}
public override void SetDefaults()
{
projectile.width = 12;
projectile.height = 12;
projectile.friendly = true;
projectile.alpha = 0;
projectile.penetrate = -1;
projectile.tileCollide = true;
projectile.ignoreWater = true;
projectile.timeLeft = 50;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 2;
Mod calamity = ModLoader.GetMod("CalamityMod");
projectile.GetGlobalProjectile<CalamityGlobalProjectile>(calamity).rogue = true;
}
public override void AI()
{
if (projectile.timeLeft < 25) { projectile.alpha += 10; }
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (!target.friendly && target.rarity != 2 && !CalamityPlayer.areThereAnyDamnBosses)
{
target.AddBuff(mod.BuffType("SilvaStun"), 300);
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

+58
View File
@@ -0,0 +1,58 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.CalPlayer;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace CalamityMod.Projectiles.Rogue
{
public class MoonSigil : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Moon Sigil");
}
public override void SetDefaults()
{
projectile.width = 20;
projectile.height = 20;
projectile.friendly = true;
projectile.alpha = 0;
projectile.penetrate = -1;
projectile.tileCollide = true;
projectile.ignoreWater = true;
projectile.timeLeft = 250;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 2;
Mod calamity = ModLoader.GetMod("CalamityMod");
projectile.GetGlobalProjectile<CalamityGlobalProjectile>(calamity).rogue = true;
}
public override void AI()
{
if (projectile.timeLeft < 25) { projectile.alpha += 10; }
}
public override void PostDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D texture = mod.GetTexture("Projectiles/Rogue/MoonSigil");
spriteBatch.Draw
(
texture,
new Vector2
(
projectile.position.X - Main.screenPosition.X + projectile.width * 0.5f,
projectile.position.Y - Main.screenPosition.Y + projectile.height - 20 * 0.5f
),
new Rectangle(0, 0, 20, 20),
Color.White,
projectile.rotation,
new Vector2(10, 10),
projectile.scale,
SpriteEffects.None,
0f
);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B