2 - Mantis Claws now inflict Hellfire. 3 - Vulcanite Lance now inflicts Hellfire instead of On Fire! 4 - Fault Line now inflicts Hellfire instead of On Fire! 5 - Blood Bath now inflicts Burning Blood. 6 - Shaderain Staff no longer inflicts any debuffs. 7 - Icicle Trident no longer inflicts Glacial State. 8 - Infernal Rift now inflicts Hellfire instead of Brimstone Flames. 9 - Vesuvius no longer buffs the player with Molten and now inflicts Hellfire. 10 - Deathhail Staff now inflicts God Slayer Inferno instead of On Fire! and Frostburn. 11 - Divine Retribution no longer inflicts Crush Depth. 12 - Elemental Ray no longer inflicts any debuffs. 13 - Helium Flash no longer inflicts Irradiated. 14 - Ice Barrage no longer inflicts Exo Freeze. 15 - Sanguine Flare no longer inflicts any debuffs. 16 - Soul Piercer now inflicts God Slayer Inferno. 17 - Staff of Blushie now only inflicts Daybroken. 18 - Ultra Liquidator no longer inflicts any debuffs and no longer requires Ichor/Cursed Flames to craft. 19 - Venusian Trident now inflicts Daybroken instead of On Fire! 20 - The Wand now only inflicts Dragonfire. 21 - Gatling Laser no longer inflicts any debuffs. 22 - Ion Blaster no longer inflicts any debuffs. 23 - Lazhar now inflicts Daybroken instead of On Fire! 24 - Aetherflux Cannon now inflicts Holy Flames. 25 - Apoctosis Array no longer inflicts any debuffs. 26 - Plasma Caster no longer inflicts any debuffs. 27 - Purge Guzzler no longer inflicts On Fire! 28 - Death Valley Duster now inflicts Armor Crunch. 29 - Forbidden Sun now inflicts Hellfire instead of On Fire! 30 - Frigidflash Bolt now inflicts Hellfire instead of On Fire! 31 - Poseidon now inflicts Eutrophication. 32 - Primordial Earth now inflicts Armor Crunch. 33 - Seething Discharge now inflicts Brimstone Flames. 34 - Tome of Fates no longer inflicts Brimstone Flames. 35 - Apotheosis no longer inflicts Armor Crunch, Demon Flames and Exo Freeze, but now inflicts Whispering Death. 36 - Augur of the Elements no longer inflicts any debuffs. 37 - Event Horizon no longer inflicts any debuffs. 38 - Nuclear Fury no longer inflicts any debuffs. 39 - Primordial Ancient now inflicts Armor Crunch. 40 - Recitation of the Beast no longer inflicts any debuffs. 41 - Arctic Bear Paw no longer inflicts Confused. 42 - Mad Alchemist's Cocktail Glove no longer inflicts Poisoned, On Fire!, Cursed Inferno, Shadowflame and Frostburn, but now inflicts Electrified and the debuff durations have been doubled. 43 - Yharim's Crystal now inflicts Dragonfire.
93 lines
3.5 KiB
C#
93 lines
3.5 KiB
C#
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Projectiles.Magic;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Magic
|
|
{
|
|
public class TomeofFates : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Tome of Fates");
|
|
Tooltip.SetDefault("Casts cosmic tentacles to spear your enemies\n" +
|
|
"Can randomly fire a red tentacle for immense damage");
|
|
SacrificeTotal = 1;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.damage = 110;
|
|
Item.DamageType = DamageClass.Magic;
|
|
Item.mana = 8;
|
|
Item.width = 28;
|
|
Item.height = 30;
|
|
Item.useTime = 5;
|
|
Item.useAnimation = 20;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.noMelee = true;
|
|
Item.knockBack = 3.5f;
|
|
Item.value = CalamityGlobalItem.Rarity9BuyPrice;
|
|
Item.rare = ItemRarityID.Cyan;
|
|
Item.UseSound = SoundID.Item103;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<CosmicTentacle>();
|
|
Item.shootSpeed = 17f;
|
|
}
|
|
|
|
// Terraria seems to really dislike high crit values in SetDefaults
|
|
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 3;
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
int i = Main.myPlayer;
|
|
int num73 = damage;
|
|
float num74 = knockback;
|
|
num74 = player.GetWeaponKnockback(Item, num74);
|
|
player.itemTime = Item.useTime;
|
|
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
|
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
|
float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
|
|
Vector2 value2 = new Vector2(num78, num79);
|
|
value2.Normalize();
|
|
Vector2 value3 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
|
value3.Normalize();
|
|
value2 = value2 * 4f + value3;
|
|
value2.Normalize();
|
|
value2 *= Item.shootSpeed;
|
|
int projChoice = Main.rand.Next(7);
|
|
float num91 = (float)Main.rand.Next(10, 160) * 0.001f;
|
|
if (Main.rand.NextBool(2))
|
|
{
|
|
num91 *= -1f;
|
|
}
|
|
float num92 = (float)Main.rand.Next(10, 160) * 0.001f;
|
|
if (Main.rand.NextBool(2))
|
|
{
|
|
num92 *= -1f;
|
|
}
|
|
if (projChoice == 0)
|
|
{
|
|
Projectile.NewProjectile(source, vector2.X, vector2.Y, value2.X, value2.Y, ModContent.ProjectileType<BrimstoneTentacle>(), (int)((double)num73 * 1.5f), num74, i, num92, num91);
|
|
}
|
|
else
|
|
{
|
|
Projectile.NewProjectile(source, vector2.X, vector2.Y, value2.X, value2.Y, ModContent.ProjectileType<CosmicTentacle>(), num73, num74, i, num92, num91);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient(ItemID.SpellTome).
|
|
AddIngredient<MeldConstruct>(9).
|
|
AddTile(TileID.Bookcases).
|
|
Register();
|
|
}
|
|
}
|
|
}
|