Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
This commit is contained in:
commit
c792eeaa28
10 files changed
+322
-6
No files matched your search
@@ -1154,6 +1154,7 @@ namespace CalamityMod.CalPlayer
|
||||
stressPills = false;
|
||||
laudanum = false;
|
||||
fleshTotem = false;
|
||||
fleshTotemCooldown = false;
|
||||
bloodPact = false;
|
||||
bloodflareCore = false;
|
||||
coreOfTheBloodGod = false;
|
||||
@@ -1273,6 +1274,7 @@ namespace CalamityMod.CalPlayer
|
||||
bloodyGlove = false;
|
||||
filthyGlove = false;
|
||||
sandCloak = false;
|
||||
sandCloakCooldown = false;
|
||||
spectralVeil = false;
|
||||
plaguedFuelPack = false;
|
||||
camper = false;
|
||||
@@ -1345,6 +1347,7 @@ namespace CalamityMod.CalPlayer
|
||||
holyWrath = false;
|
||||
profanedRage = false;
|
||||
draconicSurge = false;
|
||||
draconicSurgeCooldown = false;
|
||||
tesla = false;
|
||||
baguette = false;
|
||||
trippy = false;
|
||||
@@ -1490,7 +1493,6 @@ namespace CalamityMod.CalPlayer
|
||||
raiderCooldown = 0;
|
||||
gSabatonFall = 0;
|
||||
gSabatonCooldown = 0;
|
||||
fleshTotemCooldown = false;
|
||||
astralStarRainCooldown = 0;
|
||||
bloodflareMageCooldown = 0;
|
||||
tarraMageHealCooldown = 0;
|
||||
@@ -1499,7 +1501,6 @@ namespace CalamityMod.CalPlayer
|
||||
theBeeDamage = 0;
|
||||
reforges = 0;
|
||||
polarisBoostCounter = 0;
|
||||
sandCloakCooldown = false;
|
||||
spectralVeilImmunity = 0;
|
||||
plaguedFuelPackCooldown = 0;
|
||||
plaguedFuelPackDash = 0;
|
||||
@@ -1508,6 +1509,8 @@ namespace CalamityMod.CalPlayer
|
||||
moonCrownCooldown = 0;
|
||||
featherCrownCooldown = 0;
|
||||
nanoFlareCooldown = 0;
|
||||
fleshTotemCooldown = false;
|
||||
sandCloakCooldown = false;
|
||||
|
||||
alcoholPoisoning = false;
|
||||
shadowflame = false;
|
||||
|
||||
@@ -576,8 +576,6 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.gaelRageCooldown--;
|
||||
if (modPlayer.projRefRareLifeRegenCounter > 0)
|
||||
modPlayer.projRefRareLifeRegenCounter--;
|
||||
if (modPlayer.sandCloakCooldown && !player.HasBuff(ModContent.BuffType<SandCloakCooldown>()))
|
||||
modPlayer.sandCloakCooldown = false;
|
||||
|
||||
// Silva invincibility effects
|
||||
if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet)
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class HadopelagicEcho : ModItem
|
||||
{
|
||||
private int counter = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Hadopelagic Echo");
|
||||
Tooltip.SetDefault("Fires a string of bouncing sound waves\n" +
|
||||
"Sound waves fired later in the chain deal more damage\n" +
|
||||
"Sound waves echo additional sound waves on enemy hits");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 609;
|
||||
item.magic = true;
|
||||
item.mana = 15;
|
||||
item.width = 60;
|
||||
item.height = 60;
|
||||
item.useTime = 8;
|
||||
item.reuseDelay = 20;
|
||||
item.useAnimation = 40;
|
||||
item.useStyle = 5;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 1.5f;
|
||||
item.value = Item.buyPrice(2, 50, 0, 0);
|
||||
item.rare = 10;
|
||||
item.autoReuse = true;
|
||||
item.shootSpeed = 20f;
|
||||
item.shoot = ModContent.ProjectileType<HadopelagicEchoSoundwave>();
|
||||
item.Calamity().postMoonLordRarity = 15;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-5, 0);
|
||||
}
|
||||
|
||||
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 damageMult = 1f;
|
||||
if (counter == 1)
|
||||
damageMult = 1.1f;
|
||||
if (counter == 2)
|
||||
damageMult = 1.2f;
|
||||
if (counter == 3)
|
||||
damageMult = 1.35f;
|
||||
if (counter == 4)
|
||||
damageMult = 1.5f;
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * damageMult), knockBack, player.whoAmI, (float)counter, 0f);
|
||||
counter++;
|
||||
if (counter >= 5)
|
||||
counter = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<EidolicWail>());
|
||||
recipe.AddIngredient(ModContent.ItemType<ReaperTooth>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<DepthCells>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<Lumenite>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 4);
|
||||
recipe.AddTile(ModContent.TileType<DraedonsForge>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -91,7 +91,7 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
}
|
||||
if (BirthdayParty.PartyIsUp)
|
||||
{
|
||||
PossibleDialogs.Add("Where is my party hat? Well i stole it of course.");
|
||||
PossibleDialogs.Add("Where is my party hat? Well, I stole it of course.");
|
||||
}
|
||||
if (npc.GivenName == "Laura")
|
||||
{
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class HadopelagicEcho2 : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Echo");
|
||||
ProjectileID.Sets.TrailCacheLength[projectile.type] = 8;
|
||||
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 36;
|
||||
projectile.height = 36;
|
||||
projectile.scale = 0.85f;
|
||||
projectile.alpha = 255;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.magic = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = -1;
|
||||
projectile.timeLeft = 30;
|
||||
projectile.extraUpdates = 1;
|
||||
projectile.tileCollide = false;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
projectile.width = (int)(36f * projectile.scale);
|
||||
projectile.height = (int)(36f * projectile.scale);
|
||||
if (projectile.alpha > 100)
|
||||
{
|
||||
projectile.alpha -= 25;
|
||||
}
|
||||
if (projectile.alpha < 100)
|
||||
projectile.alpha = 100;
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X);
|
||||
|
||||
if (projectile.ai[0] == 1f)
|
||||
{
|
||||
float num472 = projectile.Center.X;
|
||||
float num473 = projectile.Center.Y;
|
||||
float num474 = 500f;
|
||||
bool flag17 = false;
|
||||
|
||||
for (int num475 = 0; num475 < Main.projectile.Length; num475++)
|
||||
{
|
||||
if (Main.npc[num475].CanBeChasedBy(projectile, false))
|
||||
{
|
||||
float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2);
|
||||
float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2);
|
||||
float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477);
|
||||
if (num478 < num474)
|
||||
{
|
||||
num474 = num478;
|
||||
num472 = num476;
|
||||
num473 = num477;
|
||||
flag17 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flag17)
|
||||
{
|
||||
float num483 = 8f;
|
||||
Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f);
|
||||
float num484 = num472 - vector35.X;
|
||||
float num485 = num473 - vector35.Y;
|
||||
float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485));
|
||||
num486 = num483 / num486;
|
||||
num484 *= num486;
|
||||
num485 *= num486;
|
||||
projectile.velocity.X = (projectile.velocity.X * 20f + num484) / 21f;
|
||||
projectile.velocity.Y = (projectile.velocity.Y * 20f + num485) / 21f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<CrushDepth>(), 600);
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
if (projectile.timeLeft < 85)
|
||||
{
|
||||
byte b2 = (byte)(projectile.timeLeft * 3);
|
||||
byte a2 = (byte)(100f * ((float)b2 / 255f));
|
||||
return new Color((int)b2, (int)b2, (int)b2, (int)a2);
|
||||
}
|
||||
return new Color(255, 255, 255, 100);
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 633 B |
@@ -0,0 +1,127 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class HadopelagicEchoSoundwave : ModProjectile
|
||||
{
|
||||
private int echoCooldown = 0;
|
||||
private bool playedSound = false;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Echo");
|
||||
ProjectileID.Sets.TrailCacheLength[projectile.type] = 4;
|
||||
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 36;
|
||||
projectile.height = 36;
|
||||
projectile.scale = 0.005f;
|
||||
projectile.alpha = 100;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.magic = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 0;
|
||||
projectile.timeLeft = 450;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (projectile.ai[0] == 0f || projectile.ai[0] == 4f)
|
||||
{
|
||||
if (!playedSound)
|
||||
{
|
||||
Main.PlaySound(Main.rand.NextBool(100) ? mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/Sunskater") : mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/WyrmScream"), (int)projectile.Center.X, (int)projectile.Center.Y);
|
||||
playedSound = true;
|
||||
}
|
||||
}
|
||||
if (projectile.localAI[0] < 1f)
|
||||
{
|
||||
projectile.localAI[0] += 0.05f;
|
||||
projectile.scale += 0.05f;
|
||||
projectile.width = (int)(36f * projectile.scale);
|
||||
projectile.height = (int)(36f * projectile.scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
projectile.width = 36;
|
||||
projectile.height = 36;
|
||||
}
|
||||
|
||||
if (echoCooldown > 0)
|
||||
echoCooldown--;
|
||||
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X);
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
if (projectile.velocity.X != oldVelocity.X)
|
||||
{
|
||||
projectile.velocity.X = -oldVelocity.X;
|
||||
}
|
||||
if (projectile.velocity.Y != oldVelocity.Y)
|
||||
{
|
||||
projectile.velocity.Y = -oldVelocity.Y;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<CrushDepth>(), 600);
|
||||
target.AddBuff(BuffID.Ichor, 600);
|
||||
target.AddBuff(BuffID.Electrified, 600);
|
||||
projectile.velocity *= 0.85f;
|
||||
|
||||
if (echoCooldown == 0 && projectile.ai[0] == 4f)
|
||||
{
|
||||
echoCooldown = 60;
|
||||
int echoID = ModContent.ProjectileType<HadopelagicEcho2>();
|
||||
int echoDamage = (int)(0.2f * projectile.damage);
|
||||
float echoKB = projectile.knockBack / 3;
|
||||
int echos = 5;
|
||||
for (int i = 0; i < echos; ++i)
|
||||
{
|
||||
float startDist = Main.rand.NextFloat(260f, 270f);
|
||||
Vector2 startDir = Main.rand.NextVector2Unit();
|
||||
Vector2 startPoint = target.Center + (startDir * startDist);
|
||||
|
||||
float echoSpeed = Main.rand.NextFloat(15f, 18f);
|
||||
Vector2 velocity = startDir * (-echoSpeed);
|
||||
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(startPoint, velocity, echoID, echoDamage, echoKB, projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
if (projectile.timeLeft < 85)
|
||||
{
|
||||
byte b2 = (byte)(projectile.timeLeft * 3);
|
||||
byte a2 = (byte)(100f * ((float)b2 / 255f));
|
||||
return new Color((int)b2, (int)b2, (int)b2, (int)a2);
|
||||
}
|
||||
return new Color(255, 255, 255, 100);
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 633 B |
@@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Main.PlaySound(SoundID.Item73, projectile.position);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
Projectile.NewProjectile(new Vector2(position.X + (-600 + i * 60), position.Y - 800), new Vector2(0f, 5f), ModContent.ProjectileType<ExecutionersBladeStealthProj>(), (int)((double)damage * 1.4f), knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(new Vector2(position.X + (-600 + i * 60), position.Y - 800), new Vector2(0f, 5f), ModContent.ProjectileType<ExecutionersBladeStealthProj>(), (int)((double)projectile.damage * 1.2f), projectile.knockBack, player.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user