minion cleanup part 1

This commit is contained in:
Altixal committed 2025-08-18 22:43:32 +07:00
1 parent d6539004ad
commit 55f277aaa7
75 files changed
+541 -595

No files matched your search

+7 -11
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -25,8 +26,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 56;
Item.knockBack = 3f;
Item.useAnimation = Item.useTime = 20;
Item.buffType = ModContent.BuffType<AbandonedSlimeBuff>();
Item.shoot = ModContent.ProjectileType<AstrageldonSummon>();
Item.shootSpeed = 10f;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.rare = ItemRarityID.Lime;
@@ -48,21 +49,16 @@ namespace CalamityMod.Items.Weapons.Summon
slimeSlots = (int)(player.maxMinions - minionCount);
}
public override bool CanUseItem(Player player)
{
return slimeSlots >= 1;
}
public override bool CanUseItem(Player player) => slimeSlots >= 1;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
float damageMult = ((float)Math.Log(slimeSlots, 8f)) + 1f;
position = player.ClampedMouseWorld();
velocity.X = 0;
velocity.Y = 0;
int slime = Projectile.NewProjectile(source, position, velocity, type, (int)(damage * damageMult), knockback, player.whoAmI);
Main.projectile[slime].originalDamage = (int)(Item.damage * damageMult);
Main.projectile[slime].minionSlots = slimeSlots;
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, (int)(damage * damageMult), knockback, player.whoAmI);
minion.originalDamage = (int)(Item.damage * damageMult);
minion.minionSlots = slimeSlots;
return false;
}
}
+6 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -35,6 +36,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 50;
Item.damage = 25;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<IceClasperBuff>();
Item.shoot = ModContent.ProjectileType<IceClasperMinion>();
Item.knockBack = 2f;
@@ -50,7 +52,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, player.ClampedMouseWorld(), Main.rand.NextVector2Circular(1f, 1f), type, damage, knockback, player.whoAmI);
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Main.rand.NextVector2Circular(1f, 1f), type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -32,6 +33,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 1f;
Item.mana = 10;
Item.buffType = ModContent.BuffType<BelladonnaSpiritBuff>();
Item.shoot = ModContent.ProjectileType<BelladonnaSpirit>();
Item.useAnimation = Item.useTime = 35;
@@ -45,9 +47,9 @@ namespace CalamityMod.Items.Weapons.Summon
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int belladonna = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(belladonna))
Main.projectile[belladonna].originalDamage = Item.damage;
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
public override void AddRecipes()
+6 -10
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -23,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
Item.UseSound = SoundID.Item15; //phaseblade sound effect
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<BlackHawkBuff>();
Item.shoot = ModContent.ProjectileType<BlackHawkSummon>();
Item.shootSpeed = 6f; // Affects bullet speed
Item.DamageType = DamageClass.Summon;
@@ -31,15 +33,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
if (player.whoAmI == Main.myPlayer)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI, 0f, 1f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI, 0f, 1f);
minion.originalDamage = Item.damage;
return false;
}
}
+5 -7
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
@@ -30,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Green;
Item.UseSound = SoundID.Item44 with { Pitch = 0.5f };
Item.autoReuse = true;
Item.shootSpeed = 5;
Item.buffType = ModContent.BuffType<BrittleStar>();
Item.shoot = ModContent.ProjectileType<BrittleStarMinion>();
Item.DamageType = DamageClass.Summon;
}
@@ -45,12 +46,9 @@ namespace CalamityMod.Items.Weapons.Summon
if (player.altFunctionUse != 2)
{
Item.noUseGraphic = false;
position = player.ClampedMouseWorld();
velocity = Vector2.Zero;
int SummonNumber = player.ownedProjectileCounts[type];
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0, 0, SummonNumber);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI, 0, 0, SummonNumber);
minion.originalDamage = Item.damage;
}
if (player.altFunctionUse == 2)
{
+5 -1
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
@@ -45,6 +46,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 10;
Item.useAnimation = Item.useTime = 10;
Item.knockBack = 0.25f;
Item.buffType = ModContent.BuffType<CalamarisLamentBuff>();
Item.shoot = ModContent.ProjectileType<CalamarisLamentMinion>();
Item.shootSpeed = 1f; // This does nothing, it's just here so it's able to act like a staff.
@@ -59,7 +61,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, player.ClampedMouseWorld(), velocity, type, damage, knockback, player.whoAmI);
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), velocity, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+6 -8
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -17,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 10;
Item.damage = 15;
Item.useStyle = ItemUseStyleID.Swing;
Item.shootSpeed = 10f;
Item.buffType = ModContent.BuffType<CausticStaffBuff>();
Item.shoot = ModContent.ProjectileType<CausticStaffSummon>();
Item.UseSound = SoundID.Item77;
Item.useAnimation = Item.useTime = 25;
@@ -34,12 +35,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI, 0f, 1f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI, 0f, 1f);
minion.originalDamage = Item.damage;
return false;
}
+6 -4
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -17,6 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 16;
Item.knockBack = 2f;
Item.mana = 10;
Item.buffType = ModContent.BuffType<CinderBlossomBuff>();
Item.shoot = ModContent.ProjectileType<CinderBlossom>();
Item.useAnimation = Item.useTime = 30;
@@ -32,10 +34,10 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
int p = Projectile.NewProjectile(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+5 -11
View File
@@ -1,4 +1,4 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -29,22 +29,16 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.LightRed;
Item.UseSound = SoundID.Item44;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<Corroslime>();
Item.shoot = ModContent.ProjectileType<CorroslimeMinion>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
position = player.ClampedMouseWorld();
velocity.X = 0;
velocity.Y = 0;
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
@@ -27,8 +28,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.noMelee = true;
Item.UseSound = SoundID.DD2_BetsyFlyingCircleAttack;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<CorvidHarbringerBuff>();
Item.shoot = ModContent.ProjectileType<PowerfulRaven>();
Item.shootSpeed = 13f;
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
Item.rare = ModContent.RarityType<CosmicPurple>();
@@ -36,12 +37,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+6 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Buffs.Summon;
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
@@ -27,8 +28,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 10;
Item.useAnimation = Item.useTime = 10;
Item.knockBack = 0.25f;
Item.buffType = ModContent.BuffType<CosmicEnergy>();
Item.shoot = ModContent.ProjectileType<CosmicEnergySpiral>();
Item.shootSpeed = 10f;
Item.UseSound = SoundID.Item60;
Item.useStyle = ItemUseStyleID.Swing;
@@ -42,10 +43,10 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+13 -13
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Projectiles.Summon;
@@ -27,6 +28,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 6f;
Item.UseSound = SoundID.Item15; //phaseblade sound effect
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<CosmicViperEngineBuff>();
Item.shoot = ModContent.ProjectileType<CosmicViperSummon>();
Item.shootSpeed = 10f; // Affects bullet speed
Item.DamageType = DamageClass.Summon;
@@ -37,20 +39,18 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
float speed = Item.shootSpeed;
Vector2 spawnPos = player.RotatedRelativePoint(player.MountedCenter, true);
float xPos = Main.screenPosition.X + Main.mouseX - spawnPos.X;
float yPos = Main.screenPosition.Y + (player.gravDir == -1 ? Main.screenHeight - Main.mouseY : Main.mouseY) - spawnPos.Y;
Vector2 vel = new Vector2(xPos, yPos).SafeNormalize(Vector2.UnitX * player.direction) * speed;
player.AddBuff(Item.buffType, 2);
spawnPos = player.ClampedMouseWorld();
vel = vel.RotatedBy(MathHelper.PiOver2);
int p = Projectile.NewProjectile(source, spawnPos + vel, vel, type, damage, knockback, player.whoAmI, 0f, 1f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
float speed = Item.shootSpeed;
Vector2 spawnPos = player.RotatedRelativePoint(player.MountedCenter, true);
float xPos = Main.screenPosition.X + Main.mouseX - spawnPos.X;
float yPos = Main.screenPosition.Y + (player.gravDir == -1 ? Main.screenHeight - Main.mouseY : Main.mouseY) - spawnPos.Y;
Vector2 vel = new Vector2(xPos, yPos).SafeNormalize(Vector2.UnitX * player.direction) * speed;
spawnPos = player.ClampedMouseWorld();
vel = vel.RotatedBy(MathHelper.PiOver2);
var minion = Projectile.NewProjectileDirect(source, spawnPos + vel, vel, type, damage, knockback, player.whoAmI, 0f, 1f);
minion.originalDamage = Item.damage;
return false;
}
+14 -17
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
@@ -40,8 +41,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ModContent.RarityType<Turquoise>();
Item.UseSound = SoundID.Item44;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<CosmilampBuff>();
Item.shoot = ModContent.ProjectileType<CosmilampMinion>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
@@ -49,26 +50,22 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
// Reset the timer for all lamps, to re-align the formation.
foreach (Projectile pro in Main.ActiveProjectiles)
{
if (pro.type == type && pro.owner == player.whoAmI)
{
pro.ModProjectile<CosmilampMinion>().Timer = 0f;
pro.netUpdate = true;
}
}
player.AddBuff(Item.buffType, 2);
int existingLamps = player.ownedProjectileCounts[type];
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
// Reset the timer for all lamps, to re-align the formation.
foreach (Projectile pro in Main.ActiveProjectiles)
{
if (pro.type == type && pro.owner == player.whoAmI)
{
Main.projectile[p].originalDamage = Item.damage;
Main.projectile[p].ai[0] = existingLamps;
pro.ModProjectile<CosmilampMinion>().Timer = 0f;
pro.netUpdate = true;
}
}
int existingLamps = player.ownedProjectileCounts[type];
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
minion.ai[0] = existingLamps;
return false;
}
}
+5 -11
View File
@@ -1,5 +1,5 @@
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -30,22 +30,16 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.LightRed;
Item.UseSound = SoundID.Item44;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<Crimslime>();
Item.shoot = ModContent.ProjectileType<CrimslimeMinion>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
position = player.ClampedMouseWorld();
velocity.X = 0;
velocity.Y = 0;
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+6 -9
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -11,10 +12,6 @@ namespace CalamityMod.Items.Weapons.Summon
public class DaedalusGolemStaff : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Summon";
public override void SetStaticDefaults()
{
// Funny Hollow Knight reference.
}
public override void SetDefaults()
{
@@ -27,8 +24,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 3f;
Item.UseSound = SoundID.Item67;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<DaedalusGolemBuff>();
Item.shoot = ModContent.ProjectileType<DaedalusGolem>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
@@ -36,13 +33,13 @@ namespace CalamityMod.Items.Weapons.Summon
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
Vector2 mouse = player.ClampedMouseWorld();
Point mouseTileCoords = mouse.ToTileCoordinates();
if (!CalamityUtils.ParanoidTileRetrieval(mouseTileCoords.X, mouseTileCoords.Y).IsTileSolidGround())
{
int p = Projectile.NewProjectile(source, mouse, Vector2.UnitY * 4f, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, mouse, Vector2.UnitY * 4f, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
}
return false;
}
+5 -12
View File
@@ -1,5 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
@@ -31,22 +30,16 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Orange;
Item.UseSound = SoundID.Item44;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<DankCreeperBuff>();
Item.shoot = ModContent.ProjectileType<DankCreeperMinion>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
position = player.ClampedMouseWorld();
velocity.X = 0;
velocity.Y = 0;
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+8 -9
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
@@ -31,8 +32,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 2f;
Item.autoReuse = true;
Item.useAnimation = Item.useTime = 15;
Item.buffType = ModContent.BuffType<DazzlingStabberBuff>();
Item.shoot = ModContent.ProjectileType<DazzlingStabber>();
Item.shootSpeed = 13f;
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType<Turquoise>();
@@ -43,14 +44,12 @@ namespace CalamityMod.Items.Weapons.Summon
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
player.AddBuff(Item.buffType, 2);
for (int i = 0; i < 3; i++)
{
for (int i = 0; i < 3; i++)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI, 0, 0, i + 1);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI, 0, 0, i + 1);
minion.originalDamage = Item.damage;
}
float angleMax = MathHelper.ToRadians(360f);
if (CalamityUtils.CountOwnedProjectiles(type, player.whoAmI) == 1)
+6 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -22,17 +23,17 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityGreenBuyPrice;
Item.rare = ItemRarityID.Green;
Item.UseSound = SoundID.NPCHit8;
Item.buffType = ModContent.BuffType<MiniatureEyeofCthulhu>();
Item.shoot = ModContent.ProjectileType<DeathstareEyeball>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
int p = Projectile.NewProjectile(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+6 -9
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -28,20 +29,16 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Pink;
Item.UseSound = SoundID.Item44;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<AquaticStar>();
Item.shoot = ModContent.ProjectileType<AquaticStarMinion>();
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
position = player.ClampedMouseWorld();
velocity = Vector2.Zero;
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+6 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
@@ -28,16 +29,16 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType<Turquoise>();
Item.UseSound = SoundID.DD2_SkeletonDeath;
Item.buffType = ModContent.BuffType<SkeletalDragonsBuff>();
Item.shoot = ModContent.ProjectileType<SkeletalDragonMother>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+6 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -18,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 26;
Item.damage = 20;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<HermitCrab>();
Item.shoot = ModContent.ProjectileType<HermitCrabMinion>();
Item.knockBack = 2f;
@@ -33,7 +35,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, player.ClampedMouseWorld(), Main.rand.NextVector2CircularEdge(5f, 5f), type, damage, knockback, player.whoAmI);
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Main.rand.NextVector2CircularEdge(5f, 5f), type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+31 -33
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
@@ -27,8 +28,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.noMelee = true;
Item.UseSound = SoundID.Item60;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<EndoHydraBuff>();
Item.shoot = ModContent.ProjectileType<EndoHydraBody>();
Item.shootSpeed = 10f;
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
Item.rare = ModContent.RarityType<CosmicPurple>();
@@ -36,41 +37,38 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
player.AddBuff(Item.buffType, 2);
bool bodyExists = false;
int bodyIndex = -1;
foreach (Projectile p in Main.ActiveProjectiles)
{
bool bodyExists = false;
int bodyIndex = -1;
foreach (Projectile p in Main.ActiveProjectiles)
if (p.type == type && p.owner == player.whoAmI)
{
if (p.type == type && p.owner == player.whoAmI)
{
bodyIndex = p.whoAmI;
bodyExists = true;
break;
}
bodyIndex = p.whoAmI;
bodyExists = true;
break;
}
if (bodyExists)
}
if (bodyExists)
{
var head = Projectile.NewProjectileDirect(source, player.Center, Main.rand.NextVector2Unit(), ModContent.ProjectileType<EndoHydraHead>(), damage, knockback, player.whoAmI, bodyIndex);
head.originalDamage = Item.damage;
}
else
{
bodyIndex = Projectile.NewProjectile(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(bodyIndex))
Main.projectile[bodyIndex].originalDamage = Item.damage;
var head = Projectile.NewProjectileDirect(source, player.Center, Main.rand.NextVector2Unit(), ModContent.ProjectileType<EndoHydraHead>(), damage, knockback, player.whoAmI, bodyIndex);
head.originalDamage = Item.damage;
for (int i = 0; i < 72; i++)
{
int p = Projectile.NewProjectile(source, player.Center, Main.rand.NextVector2Unit(), ModContent.ProjectileType<EndoHydraHead>(), damage, knockback, player.whoAmI, bodyIndex);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
else
{
bodyIndex = Projectile.NewProjectile(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
int head = Projectile.NewProjectile(source, player.Center, Main.rand.NextVector2Unit(), ModContent.ProjectileType<EndoHydraHead>(), damage, knockback, player.whoAmI, bodyIndex);
if (Main.projectile.IndexInRange(bodyIndex))
Main.projectile[bodyIndex].originalDamage = Item.damage;
if (Main.projectile.IndexInRange(head))
Main.projectile[head].originalDamage = Item.damage;
for (int i = 0; i < 72; i++)
{
Dust dust = Dust.NewDustPerfect(Main.projectile[bodyIndex].Center, 113);
dust.velocity = (MathHelper.TwoPi * Vector2.Dot((i / 72f * MathHelper.TwoPi).ToRotationVector2(), player.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(i / 72f * -MathHelper.TwoPi))).ToRotationVector2();
dust.velocity = dust.velocity.RotatedBy(i / 36f * MathHelper.TwoPi) * 8f;
dust.noGravity = true;
dust.scale = 1.9f;
}
Dust dust = Dust.NewDustPerfect(Main.projectile[bodyIndex].Center, 113);
dust.velocity = (MathHelper.TwoPi * Vector2.Dot((i / 72f * MathHelper.TwoPi).ToRotationVector2(), player.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(i / 72f * -MathHelper.TwoPi))).ToRotationVector2();
dust.velocity = dust.velocity.RotatedBy(i / 36f * MathHelper.TwoPi) * 8f;
dust.noGravity = true;
dust.scale = 1.9f;
}
}
return false;
+13 -14
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
@@ -33,8 +34,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 4f;
Item.autoReuse = true;
Item.useAnimation = Item.useTime = 10;
Item.buffType = ModContent.BuffType<EndoCooperBuff>();
Item.shoot = ModContent.ProjectileType<EndoCooperBody>();
Item.shootSpeed = 10f;
Item.value = CalamityGlobalItem.RarityHotPinkBuyPrice;
Item.rare = ModContent.RarityType<HotPink>();
@@ -45,21 +46,19 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
CalamityUtils.KillShootProjectileMany(player, new int[]
{
CalamityUtils.KillShootProjectileMany(player, new int[]
{
type,
ModContent.ProjectileType<EndoCooperLimbs>(),
ModContent.ProjectileType<EndoBeam>()
});
type,
ModContent.ProjectileType<EndoCooperLimbs>(),
ModContent.ProjectileType<EndoBeam>()
});
SummonEndoCooper(source, AttackMode, player.ClampedMouseWorld(), damage, Item.damage, knockback, player, out _, out _);
player.AddBuff(Item.buffType, 2);
SummonEndoCooper(source, AttackMode, player.ClampedMouseWorld(), damage, Item.damage, knockback, player, out _, out _);
AttackMode++;
if (AttackMode > 3)
AttackMode = 0;
}
AttackMode++;
if (AttackMode > 3)
AttackMode = 0;
return false;
}
+11 -5
View File
@@ -1,5 +1,5 @@
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -27,6 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 52;
Item.damage = 42;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<EntropysVigilBuff>();
Item.shoot = ModContent.ProjectileType<Calamitamini>();
Item.knockBack = 2f;
@@ -45,6 +46,8 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
Vector2 mouse = player.ClampedMouseWorld();
float randomAngleOffset = Main.rand.NextFloat(MathHelper.TwoPi);
for (int i = 0; i < 3; i++)
@@ -55,15 +58,18 @@ namespace CalamityMod.Items.Weapons.Summon
switch (i)
{
case 0:
Projectile.NewProjectile(source, mouse, spawnVelocity, ModContent.ProjectileType<Calamitamini>(), damage, knockback, player.whoAmI);
type = ModContent.ProjectileType<Calamitamini>();
break;
case 1:
Projectile.NewProjectile(source, mouse, spawnVelocity, ModContent.ProjectileType<Catastromini>(), damage, knockback, player.whoAmI);
type = ModContent.ProjectileType<Catastromini>();
break;
case 2:
Projectile.NewProjectile(source, mouse, spawnVelocity, ModContent.ProjectileType<Cataclymini>(), damage, knockback, player.whoAmI);
type = ModContent.ProjectileType<Cataclymini>();
break;
}
var minion = Projectile.NewProjectileDirect(source, mouse, spawnVelocity, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
}
return false;
+6 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
@@ -23,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 70;
Item.damage = 200;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<Phantom>();
Item.shoot = ModContent.ProjectileType<PhantomGuy>();
Item.knockBack = 1f;
@@ -42,7 +44,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, player.ClampedMouseWorld(), Main.rand.NextVector2CircularEdge(5f, 5f), type, damage, knockback, player.whoAmI);
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Main.rand.NextVector2CircularEdge(5f, 5f), type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+6 -8
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -25,19 +26,16 @@ namespace CalamityMod.Items.Weapons.Summon
Item.UseSound = SoundID.NPCHit1;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<EyeOfNightBuff>();
Item.shoot = ModContent.ProjectileType<EyeOfNightSummon>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.UnitY * -3f, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.UnitY * -3f, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+6 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -15,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.damage = 20;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<FlarebatBuff>();
Item.shoot = ModContent.ProjectileType<FlarebatMinion>();
Item.knockBack = 1f;
@@ -31,7 +33,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+5 -2
View File
@@ -1,4 +1,4 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
@@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 42;
Item.damage = 20;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<FleshBallBuff>();
Item.shoot = ModContent.ProjectileType<FleshBallMinion>();
Item.knockBack = 1f;
@@ -37,7 +38,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.UnitY * -1f, type, damage, knockback, player.whoAmI);
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.UnitY * -1f, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+4 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -28,6 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityPurpleBuyPrice;
Item.rare = ItemRarityID.Purple;
Item.UseSound = SoundID.Item44;
Item.buffType = ModContent.BuffType<FlowersOfMortalityBuff>();
Item.shoot = ModContent.ProjectileType<FlowersOfMortalityPetal>();
Item.shootSpeed = 10f;
}
@@ -36,6 +38,7 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(false, type, player);
for (int i = 0; i < 5; i++)
{
+6 -11
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -26,21 +27,15 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 10;
Item.damage = 28;
Item.useAnimation = Item.useTime = 25;
Item.buffType = ModContent.BuffType<AncientMineralSharkBuff>();
Item.shoot = ModContent.ProjectileType<ApexShark>();
Item.shootSpeed = 12f;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
vector2.X = Main.mouseX + Main.screenPosition.X;
vector2.Y = Main.mouseY + Main.screenPosition.Y;
int p = Projectile.NewProjectile(source, vector2, Vector2.Zero, ModContent.ProjectileType<ApexShark>(), damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, ModContent.ProjectileType<ApexShark>(), damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+6 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -23,17 +24,17 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
Item.rare = ItemRarityID.Blue;
Item.UseSound = SoundID.Item28;
Item.buffType = ModContent.BuffType<FrostBlossomBuff>();
Item.shoot = ModContent.ProjectileType<FrostBlossom>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
int p = Projectile.NewProjectile(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
public override void AddRecipes()
+6 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -15,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.damage = 22;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<FrostbatBuff>();
Item.shoot = ModContent.ProjectileType<FrostbatMinion>();
Item.knockBack = 1f;
@@ -31,7 +33,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+6 -8
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
@@ -24,20 +25,17 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 3f;
Item.autoReuse = true;
Item.useAnimation = Item.useTime = 14;
Item.buffType = ModContent.BuffType<GammaHydraBuff>();
Item.shoot = ModContent.ProjectileType<GammaHead>();
Item.shootSpeed = 10f;
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
Item.rare = ModContent.RarityType<PureGreen>();
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+5 -31
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
@@ -29,44 +30,17 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.rare = ItemRarityID.Lime;
Item.UseSound = SoundID.Item76;
Item.buffType = ModContent.BuffType<GastricAberrationBuff>();
Item.shoot = ModContent.ProjectileType<GastricBelcher>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
Item.autoReuse = true;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
Vector2 playerPos = player.RotatedRelativePoint(player.MountedCenter, true);
float directionX = Main.mouseX + Main.screenPosition.X - playerPos.X;
float directionY = Main.mouseY + Main.screenPosition.Y - playerPos.Y;
if (player.gravDir == -1f)
{
directionY = Main.screenPosition.Y + Main.screenHeight - Main.mouseY - playerPos.Y;
}
Vector2 spinningpoint = new Vector2(directionX, directionY);
float dist = spinningpoint.Length();
if ((float.IsNaN(spinningpoint.X) && float.IsNaN(spinningpoint.Y)) || (spinningpoint.X == 0f && spinningpoint.Y == 0f))
{
spinningpoint.X = player.direction;
spinningpoint.Y = 0f;
dist = Item.shootSpeed;
}
else
{
dist = Item.shootSpeed / dist;
}
spinningpoint.X *= dist;
spinningpoint.Y *= dist;
playerPos.X = Main.mouseX + Main.screenPosition.X;
playerPos.Y = Main.mouseY + Main.screenPosition.Y;
spinningpoint = spinningpoint.RotatedBy(Math.PI / 2D, default);
int p = Projectile.NewProjectile(source, playerPos + spinningpoint, spinningpoint, type, damage, knockback, player.whoAmI, 0f, 1f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Main.rand.NextVector2Circular(5f, 5f), type, damage, knockback, player.whoAmI, 0f, 1f);
minion.originalDamage = Item.damage;
return false;
}
}
+4 -4
View File
@@ -24,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 4.5f;
Item.UseSound = SoundID.Item30;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<GlacialEmbraceBuff>();
Item.shoot = ModContent.ProjectileType<GlacialEmbracePointyThing>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
@@ -44,11 +45,10 @@ namespace CalamityMod.Items.Weapons.Summon
}
if (player.altFunctionUse != 2 && totalMinionSlots < player.maxMinions)
{
player.AddBuff(ModContent.BuffType<GlacialEmbraceBuff>(), 120, true);
player.AddBuff(Item.buffType, 2);
position = player.ClampedMouseWorld();
int p = Projectile.NewProjectile(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
int pointyThingCount = 0;
foreach (Projectile pro in Main.ActiveProjectiles)
{
+7 -12
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -30,23 +31,17 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.LightRed;
Item.UseSound = SoundID.Item60;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<HauntedDishesBuff>();
Item.shoot = ModContent.ProjectileType<HauntedDishes>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
position = player.ClampedMouseWorld();
velocity.X = 0;
velocity.Y = 0;
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 30f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
//projectile.ai[1] is attack cooldown. Setting it here prevents immediate attacks
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI, 0f, 30f);
minion.originalDamage = Item.damage;
//projectile.ai[1] is attack cooldown. Setting it here prevents immediate attacks
return false;
}
+6 -7
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -17,6 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 1.25f;
Item.mana = 10;
Item.buffType = ModContent.BuffType<Herring>();
Item.shoot = ModContent.ProjectileType<HerringAI>();
Item.useAnimation = Item.useTime = 30;
Item.DamageType = DamageClass.Summon;
@@ -30,12 +32,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+8 -11
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -53,15 +54,14 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Pink;
Item.UseSound = SoundID.Item71;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<IgneousExaltationBuff>();
Item.shoot = ModContent.ProjectileType<IgneousBlade>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool AltFunctionUse(Player player)
{
return player.ownedProjectileCounts[Item.shoot] > 0;
}
public override bool AltFunctionUse(Player player) => player.ownedProjectileCounts[Item.shoot] > 0;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse == 2)
@@ -77,12 +77,9 @@ namespace CalamityMod.Items.Weapons.Summon
}
else
{
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 1f);
if (Main.projectile.IndexInRange(p))
{
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 1f);
minion.originalDamage = Item.damage;
int bladeIndex = 0;
foreach (Projectile pro in Main.ActiveProjectiles)
+7 -8
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -37,8 +38,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
ItemID.Sets.StaffMinionSlotsRequired[Type] = 3f;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<TheSyringe>();
}
}
public override void SetDefaults()
{
@@ -51,8 +51,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.noMelee = true;
Item.knockBack = 5f;
Item.UseSound = SoundID.Item15; //phaseblade sound effect
Item.buffType = ModContent.BuffType<ViriliBuff>();
Item.shoot = ModContent.ProjectileType<PlaguePrincess>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
@@ -64,11 +64,10 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Boss;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
@@ -23,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 10;
Item.damage = 187;
Item.useStyle = ItemUseStyleID.HoldUp;
Item.shootSpeed = 10f;
Item.buffType = ModContent.BuffType<KingofConstellationsBuff>();
Item.shoot = ModContent.ProjectileType<BlackDragonHead>();
Item.UseSound = Flare.FlareSound;
Item.useAnimation = Item.useTime = 25;
@@ -38,10 +39,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.autoReuse = true;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-20, 0);
}
public override Vector2? HoldoutOffset() => new Vector2(-20, 0);
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && player.maxMinions >= 4;
@@ -49,20 +47,23 @@ namespace CalamityMod.Items.Weapons.Summon
{
Vector2 spawnPos = new Vector2(player.position.X - 200, player.position.Y - 200);
Vector2 spawnPos2 = new Vector2(player.position.X + 200, player.position.Y - 200);
SpawnDragon(ModContent.ProjectileType<WhiteDragonHead>(), ModContent.ProjectileType<WhiteDragonBody>(), ModContent.ProjectileType<WhiteDragonTail>(), spawnPos2, player, source, damage, knockback);
SpawnDragon(ModContent.ProjectileType<BlackDragonHead>(), ModContent.ProjectileType<BlackDragonBody>(), ModContent.ProjectileType<BlackDragonTail>(), spawnPos, player, source, damage, knockback);
player.AddBuff(Item.buffType, 2);
SpawnDragon(ModContent.ProjectileType<WhiteDragonHead>(), ModContent.ProjectileType<WhiteDragonBody>(), ModContent.ProjectileType<WhiteDragonTail>(), spawnPos2, player, source, damage, Item.damage, knockback);
SpawnDragon(ModContent.ProjectileType<BlackDragonHead>(), ModContent.ProjectileType<BlackDragonBody>(), ModContent.ProjectileType<BlackDragonTail>(), spawnPos, player, source, damage, Item.damage, knockback);
return false;
}
public static void SpawnDragon(int head, int body, int tail, Vector2 spawnPos, Player player, EntitySource_ItemUse_WithAmmo source, int damage, float knockback)
public static void SpawnDragon(int headType, int bodyType, int tailType, Vector2 spawnPos, Player player, EntitySource_ItemUse_WithAmmo source, int damage, int originalDamage, float knockback)
{
// 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction
Projectile.NewProjectile(source, spawnPos, player.DirectionTo(Main.MouseWorld) * 3, head, damage, knockback, player.whoAmI);
// okay but seriously why are you multiplying zero by three
Projectile.NewProjectile(source, spawnPos, Vector2.Zero * 3, tail, damage, knockback, player.whoAmI);
var head = Projectile.NewProjectileDirect(source, spawnPos, player.DirectionTo(Main.MouseWorld) * 3, headType, damage, knockback, player.whoAmI);
head.originalDamage = originalDamage;
var tail = Projectile.NewProjectileDirect(source, spawnPos, Vector2.Zero, tailType, damage, knockback, player.whoAmI);
tail.originalDamage = originalDamage;
for (var i = 0; i < 20; i++)
{
Projectile.NewProjectile(source, spawnPos, Vector2.Zero * 3, body, damage, knockback, player.whoAmI);
var body = Projectile.NewProjectileDirect(source, spawnPos, Vector2.Zero, bodyType, damage, knockback, player.whoAmI);
body.originalDamage = originalDamage;
}
}
+6 -11
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -28,8 +29,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Purple;
Item.UseSound = SoundID.Item44;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<LegionofCelestiaBuff>();
Item.shoot = ModContent.ProjectileType<CelestialAxeMinion>();
Item.shootSpeed = 10f;
}
public override void UseStyle(Player player, Rectangle heldItemFrame)
@@ -39,15 +40,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
position = player.ClampedMouseWorld();
velocity.X = 0;
velocity.Y = 0;
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+8 -3
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
@@ -40,6 +41,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
Item.damage = 512;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<LiliesOfFinalityBuff>();
Item.shoot = ProjectileType<LiliesOfFinalityElster>();
Item.knockBack = 5f;
@@ -58,9 +60,12 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
Vector2 mouse = player.ClampedMouseWorld();
Projectile.NewProjectile(source, mouse, new Vector2(-1f, -1f) * 3f, type, damage, knockback, player.whoAmI);
Projectile.NewProjectile(source, mouse, new Vector2(1f, -1f) * 3f, ProjectileType<LiliesOfFinalityAriane>(), damage, knockback, player.whoAmI);
var elster = Projectile.NewProjectileDirect(source, mouse, new Vector2(-1f, -1f) * 3f, type, damage, knockback, player.whoAmI);
elster.originalDamage = Item.damage;
var ariane = Projectile.NewProjectileDirect(source, mouse, new Vector2(1f, -1f) * 3f, ProjectileType<LiliesOfFinalityAriane>(), damage, knockback, player.whoAmI);
ariane.originalDamage = Item.damage;
if (Main.dedServ)
return false;
+6 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
@@ -31,8 +32,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
Item.rare = ModContent.RarityType<BurnishedAuric>();
Item.UseSound = SoundID.DD2_BetsySummon;
Item.buffType = ModContent.BuffType<SepulcherMinionBuff>();
Item.shoot = ModContent.ProjectileType<SepulcherMinion>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
@@ -40,9 +41,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), -Vector2.UnitY * 5f, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), -Vector2.UnitY * 5f, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+7 -4
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon.MirrorofKalandraMinions;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
@@ -53,6 +54,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.useAnimation = Item.useTime = 30;
Item.knockBack = 4f;
Item.mana = 10;
Item.buffType = ModContent.BuffType<KalandraMirrorBuff>();
Item.shoot = ModContent.ProjectileType<AtzirisDisfavor>();
Item.autoReuse = true;
@@ -71,6 +73,7 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
if (player.ownedProjectileCounts[ModContent.ProjectileType<AtzirisDisfavor>()] == 1)
{
type = ModContent.ProjectileType<HopeShredder>();
@@ -82,9 +85,9 @@ namespace CalamityMod.Items.Weapons.Summon
type = ModContent.ProjectileType<Starforge>();
}
int minion = Projectile.NewProjectile(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(minion))
Main.projectile[minion].rotation = -MathHelper.PiOver2;
var minion = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.rotation = -MathHelper.PiOver2;
minion.originalDamage = Item.damage;
return false;
}
+10 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
@@ -42,6 +43,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 26;
Item.damage = 275;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<MutatedTruffleBuff>();
Item.shoot = ModContent.ProjectileType<MutatedTruffleMinion>();
Item.knockBack = 5f;
@@ -54,12 +56,15 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
}
// Only one can be summoned.
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] < 1 && player.maxMinions >= 3;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
// Only one can be summoned.
if (player.ownedProjectileCounts[type] < 1 && player.maxMinions >= 3)
Projectile.NewProjectile(source, player.ClampedMouseWorld(), Main.rand.NextVector2Circular(2f, 2f), type, damage, knockback, player.whoAmI);
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Main.rand.NextVector2Circular(2f, 2f), type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+10 -13
View File
@@ -1,4 +1,4 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
@@ -16,7 +16,6 @@ namespace CalamityMod.Items.Weapons.Summon
public override void SetStaticDefaults()
{
ItemID.Sets.StaffMinionSlotsRequired[Type] = 5f;
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<Vigilance>();
}
@@ -25,7 +24,9 @@ namespace CalamityMod.Items.Weapons.Summon
Item.width = Item.height = 56;
Item.damage = 375;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<PerditionBuff>();
Item.shoot = ModContent.ProjectileType<PerditionBeacon>();
Item.sentry = true;
Item.knockBack = 4f;
Item.useAnimation = Item.useTime = 10; // 9 because of useStyle 1.
@@ -38,19 +39,15 @@ namespace CalamityMod.Items.Weapons.Summon
Item.UseSound = SoundID.DD2_EtherianPortalOpen;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] < 1;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
if (player.ownedProjectileCounts[type] < 1)
Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
}
else
{
// Play some demonic noises prior to a target being selected.
SoundEngine.PlaySound(SoundID.Zombie93, player.Center);
SoundEngine.PlaySound(SoundID.Item119, player.Center);
}
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
player.UpdateMaxTurrets();
return false;
}
}
+6 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -41,6 +42,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 50;
Item.damage = 58;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<PlantationStaffBuff>();
Item.shoot = ModContent.ProjectileType<PlantationStaffSummon>();
Item.knockBack = 1f;
@@ -57,7 +59,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, player.ClampedMouseWorld(), Main.rand.NextVector2Circular(2f, 2f), type, damage, knockback, player.whoAmI);
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Main.rand.NextVector2Circular(2f, 2f), type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+6 -8
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -29,19 +30,16 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Green;
Item.UseSound = SoundID.Item42;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<PuffWarriorBuff>();
Item.shoot = ModContent.ProjectileType<PuffWarrior>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int puffGuy = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(puffGuy))
Main.projectile[puffGuy].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
@@ -29,22 +30,21 @@ namespace CalamityMod.Items.Weapons.Summon
Item.UseSound = SoundID.Item44;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<ResurrectionButterflyBuff>();
Item.shoot = ModContent.ProjectileType<PinkButterfly>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
Vector2 clampedMouse = player.ClampedMouseWorld();
Vector2 mouseDirection = Vector2.Normalize(clampedMouse - player.Center) * Item.shootSpeed;
Vector2 mouseDirection = Vector2.Normalize(clampedMouse - player.Center) * 10f;
int p = Projectile.NewProjectile(source, clampedMouse, mouseDirection.RotatedBy(MathHelper.PiOver2), ModContent.ProjectileType<PinkButterfly>(), damage, knockback, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
p = Projectile.NewProjectile(source, clampedMouse, mouseDirection.RotatedBy(-MathHelper.PiOver2), ModContent.ProjectileType<PurpleButterfly>(), damage, knockback, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var pink = Projectile.NewProjectileDirect(source, clampedMouse, mouseDirection.RotatedBy(MathHelper.PiOver2), ModContent.ProjectileType<PinkButterfly>(), damage, knockback, Main.myPlayer, 0f, 0f);
pink.originalDamage = Item.damage;
var purple = Projectile.NewProjectileDirect(source, clampedMouse, mouseDirection.RotatedBy(-MathHelper.PiOver2), ModContent.ProjectileType<PurpleButterfly>(), damage, knockback, Main.myPlayer, 0f, 0f);
purple.originalDamage = Item.damage;
return false;
}
+6 -7
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -22,6 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 2f;
Item.mana = 10;
Item.buffType = ModContent.BuffType<Sandnado>();
Item.shoot = ModContent.ProjectileType<SandnadoMinion>();
Item.useAnimation = Item.useTime = 20;
Item.DamageType = DamageClass.Summon;
@@ -35,12 +37,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int sandnado = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(sandnado))
Main.projectile[sandnado].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+6 -4
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
@@ -23,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 4f;
Item.mana = 10;
Item.buffType = ModContent.BuffType<SarosPossessionBuff>();
Item.shoot = ModContent.ProjectileType<SarosAura>();
Item.useAnimation = Item.useTime = 10;
Item.DamageType = DamageClass.Summon;
@@ -37,10 +39,10 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
int p = Projectile.NewProjectile(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+6 -10
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -27,6 +28,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Green;
Item.UseSound = SoundID.Item83;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<BabyBloodCrawlerBuff>();
Item.shoot = ModContent.ProjectileType<BabyBloodCrawler>();
Item.DamageType = DamageClass.Summon;
@@ -36,15 +38,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
position = player.ClampedMouseWorld();
velocity.X = 0;
velocity.Y = 0;
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+5 -3
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.Summon;
using CalamityMod.Dusts;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.SunkenSea;
@@ -38,6 +39,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.shootSpeed = 12f;
Item.mana = 10;
Item.rare = ItemRarityID.Green;
Item.buffType = ModContent.BuffType<SeashineSwordBuff>();
Item.shoot = ModContent.ProjectileType<SeashineSwordProj>();
}
public override bool AltFunctionUse(Player player) => true;
@@ -90,11 +92,11 @@ namespace CalamityMod.Items.Weapons.Summon
}
else // Toss out the summon
{
player.AddBuff(Item.buffType, 2);
SoundEngine.PlaySound(SoundID.Item1, player.Center);
int pr = Projectile.NewProjectile(source, player.Center, velocity, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(pr))
Main.projectile[pr].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, player.Center, velocity, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
float angleMax = MathHelper.ToRadians(360f);
if (CalamityUtils.CountProjectiles(type) == 1)
+6 -8
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -27,19 +28,16 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Pink;
Item.UseSound = SoundID.Item44;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<ShellfishBuff>();
Item.shoot = ModContent.ProjectileType<Shellfish>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+6 -4
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
@@ -23,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.useAnimation = Item.useTime = 10;
Item.mana = 10;
Item.knockBack = 10f;
Item.buffType = ModContent.BuffType<SiriusBuff>();
Item.shoot = ModContent.ProjectileType<SiriusMinion>();
Item.DamageType = DamageClass.Summon;
Item.useStyle = ItemUseStyleID.Swing;
@@ -36,10 +38,10 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
int p = Projectile.NewProjectile(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -24,22 +25,19 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Orange;
Item.UseSound = SoundID.Item44;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<SmallSkeletonBuff>();
Item.shoot = ModContent.ProjectileType<SmallSkeletonMinion>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Point mouseTileCoords = position.ToTileCoordinates();
player.AddBuff(Item.buffType, 2);
Point mouseTileCoords = player.ClampedMouseWorld().ToTileCoordinates();
if (WorldGen.SolidTile(mouseTileCoords.X, mouseTileCoords.Y))
return false;
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+3 -1
View File
@@ -1,4 +1,5 @@
using System.Linq;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
@@ -31,8 +32,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ModContent.RarityType<CosmicPurple>();
Item.UseSound = SoundID.Item113;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<Mechworm>();
Item.shoot = ModContent.ProjectileType<MechwormHead>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
@@ -104,6 +105,7 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
int head = -1;
int tail = -1;
foreach (Projectile p in Main.ActiveProjectiles)
+14 -17
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -24,6 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 1.25f;
Item.mana = 10;
Item.buffType = ModContent.BuffType<AstralProbeBuff>();
Item.shoot = ModContent.ProjectileType<AstralProbeSummon>();
Item.useAnimation = Item.useTime = 20;
Item.DamageType = DamageClass.Summon;
@@ -37,24 +39,19 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), velocity, type, damage, knockback, player.whoAmI, 0f, 1f);
if (Main.projectile.IndexInRange(p))
{
Main.projectile[p].originalDamage = Item.damage;
Main.projectile[p].ModProjectile<AstralProbeSummon>().ProbeIndex = player.ownedProjectileCounts[type];
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI, 0f, 1f);
minion.originalDamage = Item.damage;
minion.ModProjectile<AstralProbeSummon>().ProbeIndex = player.ownedProjectileCounts[type];
int bladeIndex = 0;
foreach (Projectile pro in Main.ActiveProjectiles)
int bladeIndex = 0;
foreach (Projectile pro in Main.ActiveProjectiles)
{
if (pro.type == type && pro.owner == player.whoAmI)
{
if (pro.type == type && pro.owner == player.whoAmI)
{
pro.ModProjectile<AstralProbeSummon>().ProbeIndex = bladeIndex++;
pro.ModProjectile<AstralProbeSummon>().AITimer = 0f;
pro.netUpdate = true;
}
pro.ModProjectile<AstralProbeSummon>().ProbeIndex = bladeIndex++;
pro.ModProjectile<AstralProbeSummon>().AITimer = 0f;
pro.netUpdate = true;
}
}
+6 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
@@ -29,6 +30,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.useAnimation = Item.useTime = 20;
Item.knockBack = 4f;
Item.mana = 10;
Item.buffType = ModContent.BuffType<StellarTorusBuff>();
Item.shoot = ModContent.ProjectileType<StellarTorusSummon>();
Item.noMelee = true;
@@ -43,11 +45,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int minion = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Main.rand.NextVector2Circular(2f, 2f), ModContent.ProjectileType<StellarTorusSummon>(), damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(minion))
Main.projectile[minion].originalDamage = Item.OriginalDamage;
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Main.rand.NextVector2Circular(2f, 2f), ModContent.ProjectileType<StellarTorusSummon>(), damage, knockback, player.whoAmI);
minion.originalDamage = Item.OriginalDamage;
return false;
}
+6 -8
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs.NormalNPCs;
using CalamityMod.Buffs.Summon;
using CalamityMod.NPCs.NormalNPCs;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -25,19 +26,16 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Green;
Item.UseSound = Stormlion.DeathSound;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<BabyStormlionBuff>();
Item.shoot = ModContent.ProjectileType<StormjawBaby>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+6 -4
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -24,6 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
Item.rare = ItemRarityID.Blue;
Item.UseSound = SoundID.Item44;
Item.buffType = ModContent.BuffType<SolarSpirit>();
Item.shoot = ModContent.ProjectileType<SolarPixie>();
Item.DamageType = DamageClass.Summon;
}
@@ -32,10 +34,10 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
int p = Projectile.NewProjectile(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+6 -7
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -27,18 +28,16 @@ namespace CalamityMod.Items.Weapons.Summon
Item.UseSound = SoundID.Item14;
Item.autoReuse = true;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<TacticalPlagueEngineBuff>();
Item.shoot = ModContent.ProjectileType<TacticalPlagueJet>();
Item.shootSpeed = 7f; // Affects bullet speed
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 1f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 1f);
minion.originalDamage = Item.damage;
return false;
}
+6 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon.Umbrella;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
@@ -26,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.mana = 99;
Item.useAnimation = Item.useTime = 10;
Item.DamageType = DamageClass.Summon;
Item.shootSpeed = 0f;
Item.buffType = ModContent.BuffType<MagicHatBuff>();
Item.shoot = ModContent.ProjectileType<MagicHat>();
Item.useStyle = ItemUseStyleID.Swing;
@@ -41,10 +42,10 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectileMany(player, type, ModContent.ProjectileType<MagicArrow>(), ModContent.ProjectileType<MagicHammer>(), ModContent.ProjectileType<MagicAxe>(), ModContent.ProjectileType<MagicUmbrella>(), ModContent.ProjectileType<MagicRifle>());
int p = Projectile.NewProjectile(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -23,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
Item.rare = ItemRarityID.Pink;
Item.UseSound = SoundID.Item46;
Item.buffType = ModContent.BuffType<TundraFlameBlossomsBuff>();
Item.shoot = ModContent.ProjectileType<TundraFlameBlossom>();
Item.DamageType = DamageClass.Summon;
}
@@ -31,6 +33,7 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(false, type, player);
for (int i = 0; i < 3; i++)
{
+6 -4
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -25,6 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityLightPurpleBuyPrice;
Item.rare = ItemRarityID.LightPurple;
Item.UseSound = SoundID.Item44;
Item.buffType = ModContent.BuffType<SolarGodSpiritBuff>();
Item.shoot = ModContent.ProjectileType<SolarGod>();
Item.DamageType = DamageClass.Summon;
}
@@ -33,10 +35,10 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(true, type, player);
int p = Projectile.NewProjectile(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
var minion = Projectile.NewProjectileDirect(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+8 -12
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
@@ -27,8 +28,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.knockBack = 4f;
Item.UseSound = SoundID.DD2_BetsySummon;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<SoulSeekerBuff>();
Item.shoot = ModContent.ProjectileType<SeekerSummonProj>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
@@ -37,17 +38,12 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
if (player.maxMinions - player.slotsMinions >= 1f)
{
if (player.maxMinions - player.slotsMinions >= 1f)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
{
Main.projectile[p].ai[0] = player.ownedProjectileCounts[type];
Main.projectile[p].originalDamage = Item.damage;
}
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.ai[0] = player.ownedProjectileCounts[type];
minion.originalDamage = Item.damage;
}
return false;
}
+6 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Buffs.Summon;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -19,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.height = 36;
Item.damage = 15;
Item.DamageType = DamageClass.Summon;
Item.buffType = ModContent.BuffType<VileFeederBuff>();
Item.shoot = ModContent.ProjectileType<VileFeederSummon>();
Item.knockBack = 0.5f;
@@ -37,7 +39,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, player.ClampedMouseWorld(), Main.rand.NextVector2CircularEdge(5f, 5f), type, damage, knockback, player.whoAmI);
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Main.rand.NextVector2CircularEdge(5f, 5f), type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
+14 -16
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -25,29 +26,26 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Lime;
Item.UseSound = SoundID.Item44;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<SageSpiritBuff>();
Item.shoot = ModContent.ProjectileType<SageSpirit>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
int minionCount = 0;
foreach (Projectile pro in Main.ActiveProjectiles)
{
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
if (pro.type != type || pro.owner != player.whoAmI)
continue;
int minionCount = 0;
foreach (Projectile pro in Main.ActiveProjectiles)
{
if (pro.type != type || pro.owner != player.whoAmI)
continue;
pro.localAI[0] = minionCount;
pro.netUpdate = true;
minionCount++;
}
pro.localAI[0] = minionCount;
pro.netUpdate = true;
minionCount++;
}
return false;
}
+14 -18
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
@@ -47,33 +48,28 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Red;
Item.UseSound = SoundID.Item71;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<ViridVanguardBuff>();
Item.shoot = ModContent.ProjectileType<ViridVanguardBlade>();
Item.rare = ModContent.RarityType<Turquoise>();
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 1f);
if (Main.projectile.IndexInRange(p))
{
Main.projectile[p].originalDamage = Item.damage;
Main.projectile[p].ModProjectile<ViridVanguardBlade>().BladeIndex = player.ownedProjectileCounts[type];
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 1f);
minion.originalDamage = Item.damage;
minion.ModProjectile<ViridVanguardBlade>().BladeIndex = player.ownedProjectileCounts[type];
int bladeIndex = 0;
foreach (Projectile pro in Main.ActiveProjectiles)
int bladeIndex = 0;
foreach (Projectile pro in Main.ActiveProjectiles)
{
if (pro.type == type && pro.owner == player.whoAmI)
{
if (pro.type == type && pro.owner == player.whoAmI)
{
pro.ModProjectile<ViridVanguardBlade>().BladeIndex = bladeIndex++;
pro.ModProjectile<ViridVanguardBlade>().AITimer = 0f;
pro.netUpdate = true;
}
pro.ModProjectile<ViridVanguardBlade>().BladeIndex = bladeIndex++;
pro.ModProjectile<ViridVanguardBlade>().AITimer = 0f;
pro.netUpdate = true;
}
}
return false;
}
public override void AddRecipes()
@@ -33,8 +33,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.damage = 105;
Item.knockBack = 4f;
Item.useAnimation = Item.useTime = 15; // 14 because of useStyle 1
Item.buffType = ModContent.BuffType<VoidConcentrationBuff>();
Item.shoot = ModContent.ProjectileType<VoidConcentrationAura>();
Item.shootSpeed = 10f;
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType<Turquoise>();
}
@@ -50,10 +50,9 @@ namespace CalamityMod.Items.Weapons.Summon
{
if (player.altFunctionUse != 2)
{
int p = Projectile.NewProjectile(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
player.AddBuff(ModContent.BuffType<VoidConcentrationBuff>(), 120);
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
}
return false;
}
+8 -12
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
@@ -35,24 +36,19 @@ namespace CalamityMod.Items.Weapons.Summon
Item.UseSound = SoundID.Item104;
Item.autoReuse = true;
Item.noUseGraphic = true;
Item.buffType = ModContent.BuffType<MoonFistBuff>();
Item.shoot = ModContent.ProjectileType<MoonFist>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
Item.Calamity().donorItem = true;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
int existingFists = player.ownedProjectileCounts[type];
int p = Projectile.NewProjectile(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(p))
{
Main.projectile[p].originalDamage = Item.damage;
Main.projectile[p].ai[0] = existingFists;
}
}
player.AddBuff(Item.buffType, 2);
int existingFists = player.ownedProjectileCounts[type];
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
minion.ai[0] = existingFists;
return false;
}
+4 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
@@ -27,8 +28,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
Item.rare = ItemRarityID.Yellow;
Item.UseSound = SoundID.Item46;
Item.buffType = ModContent.BuffType<WitherBlossomsBuff>();
Item.shoot = ModContent.ProjectileType<WitherBlossom>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
@@ -36,6 +37,7 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
CalamityUtils.KillShootProjectiles(false, type, player);
for (int i = 0; i < 4; i++)
{
+5 -10
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
@@ -27,8 +28,8 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ItemRarityID.Blue;
Item.UseSound = SoundID.Item15; //phaseblade sound effect
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<WulfrumDroidBuff>();
Item.shoot = ModContent.ProjectileType<WulfrumDroid>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
@@ -40,15 +41,9 @@ namespace CalamityMod.Items.Weapons.Summon
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
position = player.ClampedMouseWorld();
velocity.X = 0;
velocity.Y = 0;
int droid = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 1f);
if (Main.projectile.IndexInRange(droid))
Main.projectile[droid].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI, 0f, 1f);
minion.originalDamage = Item.damage;
return false;
}
+6 -9
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Rarities;
using CalamityMod.Sounds;
@@ -36,20 +37,16 @@ namespace CalamityMod.Items.Weapons.Summon
Item.rare = ModContent.RarityType<BurnishedAuric>();
Item.UseSound = CommonCalamitySounds.FlareSound;
Item.autoReuse = true;
Item.buffType = ModContent.BuffType<FieryDraconidBuff>();
Item.shoot = ModContent.ProjectileType<FieryDraconid>();
Item.shootSpeed = 10f;
Item.DamageType = DamageClass.Summon;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.altFunctionUse != 2)
{
position = player.ClampedMouseWorld();
int dragon = Projectile.NewProjectile(source, position, Vector2.Zero, type, damage, knockback, player.whoAmI);
if (Main.projectile.IndexInRange(dragon))
Main.projectile[dragon].originalDamage = Item.damage;
}
player.AddBuff(Item.buffType, 2);
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
minion.originalDamage = Item.damage;
return false;
}
}
+10 -10
View File
@@ -1138,11 +1138,6 @@ CloudElemental: {
Description: The Cloud Elemental will protect you
}
GlacialEmbraceBuff: {
DisplayName: Glacial Embrace
Description: The magic of the ancient ice castle will aid you
}
Corroslime: {
DisplayName: Corroslime
Description: The corroslime will protect you
@@ -1198,11 +1193,6 @@ DemonshadeSetDevilBuff: {
Description: The red devil will protect you
}
LegionofCelestiaBuff: {
DisplayName: Celestial Axe
Description: If only it was this good at chopping trees...
}
EndoCooperBuff: {
DisplayName: Endo Cooper
Description: The ascened Cooper will protect you
@@ -1273,6 +1263,11 @@ GastricAberrationBuff: {
Description: The aquatic aberration will protect you
}
GlacialEmbraceBuff: {
DisplayName: Glacial Embrace
Description: The magic of the ancient ice castle will aid you
}
HauntedDishesBuff: {
DisplayName: Haunted Dishes
Description: The haunted dishes will protect you
@@ -1323,6 +1318,11 @@ KingofConstellationsBuff: {
Description: The celestial dragons will protect you
}
LegionofCelestiaBuff: {
DisplayName: Celestial Axe
Description: If only it was this good at chopping trees...
}
LiliesOfFinalityBuff: {
DisplayName: Finality
Description: Remember our promise