the wand tweaks
This commit is contained in:
1 parent
b88aaf548f
commit
114a07cf10
5 files changed
+27
-13
No files matched your search
@@ -1,5 +1,5 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -10,6 +10,8 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class TheWand : ModItem
|
||||
{
|
||||
public static int BaseDamage = 390;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("The Wand");
|
||||
@@ -20,14 +22,14 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
item.width = 40;
|
||||
item.damage = 1;
|
||||
item.mana = 500;
|
||||
item.mana = 150;
|
||||
item.magic = true;
|
||||
item.noMelee = true;
|
||||
item.useAnimation = 20;
|
||||
item.useTime = 20;
|
||||
item.useTurn = true;
|
||||
item.useStyle = 1;
|
||||
item.knockBack = 0f;
|
||||
item.knockBack = 0.5f;
|
||||
item.UseSound = SoundID.Item102;
|
||||
item.autoReuse = true;
|
||||
item.height = 36;
|
||||
|
||||
@@ -24,7 +24,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.alpha = 255;
|
||||
projectile.timeLeft = 500;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 1;
|
||||
projectile.localNPCHitCooldown = 5;
|
||||
projectile.magic = true;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -73,17 +74,17 @@ namespace CalamityMod.Projectiles.Magic
|
||||
if (!Collision.SolidCollision(projectile.position, projectile.width, projectile.height))
|
||||
{
|
||||
projectile.alpha -= 30;
|
||||
if (projectile.alpha < 60)
|
||||
if (projectile.alpha < 225)
|
||||
{
|
||||
projectile.alpha = 60;
|
||||
projectile.alpha = 225;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
projectile.alpha += 30;
|
||||
if (projectile.alpha > 150)
|
||||
if (projectile.alpha > 245)
|
||||
{
|
||||
projectile.alpha = 150;
|
||||
projectile.alpha = 245;
|
||||
}
|
||||
}
|
||||
if (projectile.ai[0] > 0f)
|
||||
|
||||
@@ -20,6 +20,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.alpha = 255;
|
||||
projectile.penetrate = -1;
|
||||
projectile.timeLeft = 5;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = -1;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -131,7 +133,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
break;
|
||||
}
|
||||
}
|
||||
int num236 = Projectile.NewProjectile((float)(num232 * 16 + 8), (float)(num231 * 16 - 24), 0f, 0f, ModContent.ProjectileType<InfernadoFriendly>(), 390, 15f, Main.myPlayer, 16f, 16f);
|
||||
int num236 = Projectile.NewProjectile((float)(num232 * 16 + 8), (float)(num231 * 16 - 24), 0f, 0f, ModContent.ProjectileType<InfernadoFriendly>(), projectile.damage, projectile.knockBack * 30f, Main.myPlayer, 16f, 16f);
|
||||
Main.projectile[num236].netUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class SparkInfernal : ModProjectile
|
||||
{
|
||||
@@ -17,6 +18,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
projectile.friendly = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.timeLeft = 300;
|
||||
projectile.magic = true;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -26,7 +28,14 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<InfernadoMarkFriendly>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
Player player = Main.player[projectile.owner];
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<InfernadoMarkFriendly>(), (int)(TheWand.BaseDamage * (player.allDamage + player.magicDamage - 1f)), projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Daybreak, 900);
|
||||
target.AddBuff(BuffID.OnFire, 900);
|
||||
}
|
||||
}
|
||||
}
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 138 B After Width: | Height: | Size: 138 B |
Reference in new issue
Block a user