1 - MORE.
This commit is contained in:
1 parent
0fc21e859d
commit
02fbf61389
5 files changed
+75
-53
No files matched your search
@@ -1,43 +0,0 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class EyeofMagnus : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Eye of Magnus");
|
||||
Tooltip.SetDefault("Fires powerful beams\n" +
|
||||
"Heals mana and health on hit");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 80;
|
||||
item.damage = 64;
|
||||
item.rare = ItemRarityID.Cyan;
|
||||
item.useAnimation = 20;
|
||||
item.useTime = 20;
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.knockBack = 2f;
|
||||
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon");
|
||||
item.magic = true;
|
||||
item.mana = 7;
|
||||
item.autoReuse = true;
|
||||
item.noMelee = true;
|
||||
item.height = 50;
|
||||
item.value = CalamityGlobalItem.Rarity9BuyPrice;
|
||||
item.shoot = ModContent.ProjectileType<MagnusBeam>();
|
||||
item.shootSpeed = 12f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-15, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Typeless
|
||||
{
|
||||
public class EyeofMagnus : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Eye of Magnus");
|
||||
Tooltip.SetDefault("Fires powerful beams that reduce enemy protection\n" +
|
||||
"This weapon scales with all your damage stats at once\n" +
|
||||
"Heals mana and health on hit");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 80;
|
||||
item.damage = 32;
|
||||
item.rare = ItemRarityID.Cyan;
|
||||
item.useAnimation = 20;
|
||||
item.useTime = 20;
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.knockBack = 5f;
|
||||
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon");
|
||||
item.autoReuse = true;
|
||||
item.noMelee = true;
|
||||
item.height = 50;
|
||||
item.value = CalamityGlobalItem.Rarity9BuyPrice;
|
||||
item.shoot = ModContent.ProjectileType<MagnusBeam>();
|
||||
item.shootSpeed = 12f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-15, 0);
|
||||
}
|
||||
|
||||
// Eye of Magnus scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts).
|
||||
public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
|
||||
{
|
||||
float formula = 5f * (player.allDamage - 1f);
|
||||
formula += player.meleeDamage - 1f;
|
||||
formula += player.rangedDamage - 1f;
|
||||
formula += player.magicDamage - 1f;
|
||||
formula += player.minionDamage - 1f;
|
||||
formula += player.Calamity().throwingDamage - 1f;
|
||||
add += formula;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<LunicEye>());
|
||||
recipe.AddIngredient(ItemID.FragmentNebula, 10);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Typeless
|
||||
item.height = 50;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.shoot = ModContent.ProjectileType<LunicBeam>();
|
||||
item.shootSpeed = 13f;
|
||||
item.shootSpeed = 12f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
@@ -52,12 +52,6 @@ namespace CalamityMod.Items.Weapons.Typeless
|
||||
add += formula;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -23,7 +24,6 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.penetrate = 1;
|
||||
projectile.extraUpdates = 2;
|
||||
projectile.alpha = 0;
|
||||
projectile.magic = true;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -202,9 +202,16 @@ namespace CalamityMod.Projectiles.Magic
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<MarkedforDeath>(), 480);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (!target.canGhostHeal || Main.player[projectile.owner].moonLeech)
|
||||
target.AddBuff(ModContent.BuffType<MarkedforDeath>(), 480);
|
||||
|
||||
if (!target.canGhostHeal || Main.player[projectile.owner].moonLeech)
|
||||
return;
|
||||
|
||||
Player player = Main.player[projectile.owner];
|
||||
|
||||
Reference in new issue
Block a user