.
No files matched your search
@@ -59,9 +59,14 @@ namespace CalamityMod.Buffs
|
||||
else if (type == BuffID.Slow)
|
||||
{
|
||||
if (npc.Calamity().slowed < npc.buffTime[buffIndex])
|
||||
{
|
||||
npc.Calamity().slowed = npc.buffTime[buffIndex];
|
||||
}
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
if (type == BuffID.Electrified)
|
||||
{
|
||||
if (npc.Calamity().electrified < npc.buffTime[buffIndex])
|
||||
npc.Calamity().electrified = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class WulfrumDroidBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Wulfrum Droid");
|
||||
Description.SetDefault("The wulfrum droid will protect you");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<WulfrumDroid>()] > 0)
|
||||
{
|
||||
modPlayer.wDroid = true;
|
||||
}
|
||||
if (!modPlayer.wDroid)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 715 B |
@@ -1968,7 +1968,8 @@ namespace CalamityMod
|
||||
ModContent.ItemType<BouncingBetty>(),
|
||||
ModContent.ItemType<TotalityBreakers>(),
|
||||
ModContent.ItemType<BlastBarrel>(),
|
||||
ModContent.ItemType<Penumbra>()
|
||||
ModContent.ItemType<Penumbra>(),
|
||||
ModContent.ItemType<ShockGrenade>()
|
||||
};
|
||||
|
||||
flaskBombProjList = new List<int>()
|
||||
@@ -1983,7 +1984,8 @@ namespace CalamityMod
|
||||
ModContent.ProjectileType<TotalityFlask>(),
|
||||
ModContent.ProjectileType<ConsecratedWaterProjectile>(),
|
||||
ModContent.ProjectileType<DesecratedWaterProj>(),
|
||||
ModContent.ProjectileType<PenumbraBomb>()
|
||||
ModContent.ProjectileType<PenumbraBomb>(),
|
||||
ModContent.ProjectileType<ShockGrenadeProjectile>()
|
||||
};
|
||||
|
||||
spikyBallList = new List<int>()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -53,10 +54,9 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
nPC.StrikeNPC(num3, 0f, 0, false, false, false);
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
NetMessage.SendData(28, -1, -1, null, l, (float)num3, 0f, 0f, 0, 0, 0);
|
||||
Projectile p = Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), num3, 0f, player.whoAmI, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,9 +64,6 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
}
|
||||
bloomCounter++;
|
||||
if (bloomCounter >= 180)
|
||||
{
|
||||
}
|
||||
if (player.whoAmI == Main.myPlayer && player.velocity.Y == 0f && player.grappling[0] == -1)
|
||||
{
|
||||
int num4 = (int)player.Center.X / 16;
|
||||
|
||||
@@ -73,10 +73,9 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
nPC.StrikeNPC(num3, 0f, 0, false, false, false);
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
NetMessage.SendData(28, -1, -1, null, l, (float)num3, 0f, 0f, 0, 0, 0);
|
||||
Projectile p = Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), num3, 0f, player.whoAmI, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,9 +83,6 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
}
|
||||
seaCounter++;
|
||||
if (seaCounter >= 180)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,12 +34,12 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
line2.text = "Rogue projectiles create nanoblades as they travel\n" +
|
||||
"Stealth strikes summon lunar flares and sparks on enemy hits\n" +
|
||||
"Stealth strikes have +30 armor penetration, deal 10% more damage, and heal for 1 HP\n" +
|
||||
"Stealth strikes have +20 armor penetration, deal 5% more damage, and heal for 1 HP\n" +
|
||||
"Rogue weapons have a chance to instantly kill normal enemies\n" +
|
||||
"5% increased rogue damage, 5% increased rogue crit chance, and 15% increased rogue velocity\n" +
|
||||
"Whenever you crit an enemy with a rogue weapon your rogue damage increases\n" +
|
||||
"This effect can stack up to 250 times\n" +
|
||||
"Max rogue damage boost is 25%\n" +
|
||||
"Max rogue damage boost is 10%\n" +
|
||||
"Rogue Crit Level: " + critLevel;
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,6 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.nanotech = true;
|
||||
modPlayer.moonCrown = true;
|
||||
modPlayer.raiderTalisman = true;
|
||||
modPlayer.electricianGlove = true;
|
||||
player.Calamity().throwingDamage += 0.05f;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -73,10 +74,11 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
nPC.StrikeNPC(num3, 0f, 0, false, false, false);
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
NetMessage.SendData(28, -1, -1, null, l, (float)num3, 0f, 0f, 0, 0, 0);
|
||||
Projectile p = Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), num3, 0f, player.whoAmI, l);
|
||||
p.minion = true;
|
||||
p.Calamity().forceMinion = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,10 +141,11 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
nPC.StrikeNPC(num3, 0f, 0, false, false, false);
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
NetMessage.SendData(28, -1, -1, null, l, (float)num3, 0f, 0f, 0, 0, 0);
|
||||
Projectile p = Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), num3, 0f, player.whoAmI, l);
|
||||
p.minion = true;
|
||||
p.Calamity().forceMinion = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -48,10 +49,11 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
nPC.StrikeNPC(num3, 0f, 0, false, false, false);
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
NetMessage.SendData(28, -1, -1, null, l, (float)num3, 0f, 0f, 0, 0, 0);
|
||||
Projectile p = Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), num3, 0f, player.whoAmI, l);
|
||||
p.minion = true;
|
||||
p.Calamity().forceMinion = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor
|
||||
item.height = 18;
|
||||
item.value = Item.buyPrice(0, 30, 0, 0);
|
||||
item.rare = 8;
|
||||
item.defense = 12; //45
|
||||
item.defense = 9; //35
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor
|
||||
item.height = 18;
|
||||
item.value = Item.buyPrice(0, 18, 0, 0);
|
||||
item.rare = 8;
|
||||
item.defense = 15;
|
||||
item.defense = 11;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor
|
||||
item.height = 18;
|
||||
item.value = Item.buyPrice(0, 24, 0, 0);
|
||||
item.rare = 8;
|
||||
item.defense = 18;
|
||||
item.defense = 14;
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
|
||||
@@ -1886,6 +1886,7 @@ Grants immunity to fire blocks, and temporary immunity to lava";
|
||||
|
||||
case ItemID.HallowedFishingCrate:
|
||||
DropHelper.DropItemCondition(player, ModContent.ItemType<UnholyEssence>(), NPC.downedMoonlord, 0.2f, 5, 10);
|
||||
DropHelper.DropItemCondition(player, (WorldGen.crimson ? ModContent.ItemType<ProfanedRagePotion>() : ModContent.ItemType<HolyWrathPotion>()), CalamityWorld.downedProvidence, 0.2f, 1, 3);
|
||||
break;
|
||||
|
||||
case ItemID.DungeonFishingCrate:
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
DropHelper.DropItem(player, ItemID.Starfish, 2, 3);
|
||||
DropHelper.DropItem(player, ItemID.Seashell, 2, 3);
|
||||
DropHelper.DropItem(player, ItemID.Coral, 2, 3);
|
||||
DropHelper.DropItem(player, ModContent.ItemType<Items.Placeables.SulphurousSand>(), 5, 10);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<CloakingGland>(), 0.5f, 2, 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<VictoryShard>(), 0.5f, 2, 3);
|
||||
if (NPC.downedPlantBoss || CalamityWorld.downedCalamitas)
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class AbyssShocker : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Abyss Shocker");
|
||||
Tooltip.SetDefault("Fires an erratic lightning bolt that arcs and bounces between enemies");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 24;
|
||||
item.noMelee = true;
|
||||
item.magic = true;
|
||||
item.channel = true;
|
||||
item.width = 86;
|
||||
item.height = 32;
|
||||
item.useTime = 50;
|
||||
item.useAnimation = 20;
|
||||
item.UseSound = SoundID.Item13;
|
||||
item.useStyle = 5;
|
||||
item.mana = 10;
|
||||
item.value = Item.buyPrice(0, 4, 0, 0);
|
||||
item.rare = 3;
|
||||
item.Calamity().postMoonLordRarity = 21;
|
||||
item.shoot = ModContent.ProjectileType<LightningArc>();
|
||||
item.shootSpeed = 14f;
|
||||
}
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/AbyssShocker_mask");
|
||||
spriteBatch.Draw
|
||||
(
|
||||
texture,
|
||||
new Vector2
|
||||
(
|
||||
item.position.X - Main.screenPosition.X + item.width * 0.5f,
|
||||
item.position.Y - Main.screenPosition.Y + item.height - texture.Height * 0.5f + 2f
|
||||
),
|
||||
new Rectangle(0, 0, texture.Width, texture.Height),
|
||||
Color.White,
|
||||
rotation,
|
||||
texture.Size() * 0.5f,
|
||||
scale,
|
||||
SpriteEffects.None,
|
||||
0f
|
||||
);
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-14, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 623 B |
@@ -21,7 +21,7 @@ Fires night wyverns and stars from the sky that stick to enemies and tiles and e
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 300;
|
||||
item.damage = 450;
|
||||
item.magic = true;
|
||||
item.mana = 12;
|
||||
item.width = 52;
|
||||
@@ -37,7 +37,7 @@ Fires night wyverns and stars from the sky that stick to enemies and tiles and e
|
||||
item.UseSound = SoundID.Item105;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<ClamorNoctusStar>();
|
||||
item.shootSpeed = 20f;
|
||||
item.shootSpeed = 25f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOrigin()
|
||||
|
||||
@@ -11,9 +11,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class HeliumFlash : ModItem
|
||||
{
|
||||
public static int BaseDamage = 1280;
|
||||
public static float Speed = 15f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Helium Flash");
|
||||
@@ -26,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.width = 76;
|
||||
item.height = 76;
|
||||
item.magic = true;
|
||||
item.damage = BaseDamage;
|
||||
item.damage = 1280;
|
||||
item.knockBack = 9.5f;
|
||||
item.mana = 26;
|
||||
item.useAnimation = 37;
|
||||
@@ -42,12 +39,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.value = Item.buyPrice(1, 80, 0, 0);
|
||||
|
||||
item.shoot = ModContent.ProjectileType<VolatileStarcore>();
|
||||
item.shootSpeed = Speed;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOrigin()
|
||||
{
|
||||
return new Vector2(15, 15);
|
||||
item.shootSpeed = 15f;
|
||||
}
|
||||
|
||||
// Creates dust at the tip of the staff when used.
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class StratusSphere : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Stratus Sphere");
|
||||
Tooltip.SetDefault("Fires an energy orb containing the essence of our stratosphere\n" +
|
||||
"Up to six of these can be active at a time");
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 500;
|
||||
item.noMelee = true;
|
||||
item.magic = true;
|
||||
item.width = 50;
|
||||
item.height = 50;
|
||||
item.useTime = 45;
|
||||
item.useAnimation = 45;
|
||||
item.shoot = ModContent.ProjectileType<StratusSphereProj>();
|
||||
item.shootSpeed = 7f;
|
||||
item.useStyle = 5;
|
||||
item.mana = 30;
|
||||
item.knockBack = 2;
|
||||
item.UseSound = SoundID.Item20;
|
||||
item.rare = 4;
|
||||
item.autoReuse = true;
|
||||
item.useTurn = true;
|
||||
item.holdStyle = 3;
|
||||
item.value = Item.buyPrice(1, 40, 0, 0);
|
||||
item.rare = 10;
|
||||
item.Calamity().postMoonLordRarity = 13;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.ownedProjectileCounts[item.shoot] >= 6)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.NebulaArcanum);
|
||||
recipe.AddIngredient(ModContent.ItemType<RuinousSoul>(), 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<ExodiumClusterOre>(), 12);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -11,24 +11,34 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Air Spinner");
|
||||
Tooltip.SetDefault("Fires feathers when enemies are near");
|
||||
Tooltip.SetDefault("Fires feathers when enemies are near\nAn exceptionally agile yoyo");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.Valor);
|
||||
item.width = 28;
|
||||
item.height = 28;
|
||||
item.melee = true;
|
||||
item.damage = 20;
|
||||
item.knockBack = 4f;
|
||||
item.useTime = 22;
|
||||
item.useAnimation = 22;
|
||||
item.autoReuse = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 4;
|
||||
item.value = Item.buyPrice(0, 4, 0, 0);
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<AirSpinnerYoyo>();
|
||||
item.shootSpeed = 14f;
|
||||
|
||||
item.rare = 3;
|
||||
item.autoReuse = false;
|
||||
item.shoot = ModContent.ProjectileType<AirSpinnerProjectile>();
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
item.value = Item.buyPrice(gold: 4);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -11,23 +11,34 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Aorta");
|
||||
Tooltip.SetDefault("An exceptionally agile yoyo");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.Valor);
|
||||
item.width = 30;
|
||||
item.height = 26;
|
||||
item.melee = true;
|
||||
item.damage = 25;
|
||||
item.knockBack = 4.25f;
|
||||
item.useTime = 22;
|
||||
item.useAnimation = 22;
|
||||
item.autoReuse = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 4.25f;
|
||||
item.value = Item.buyPrice(0, 4, 0, 0);
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<AortaYoyo>();
|
||||
item.shootSpeed = 8f;
|
||||
|
||||
item.rare = 3;
|
||||
item.autoReuse = false;
|
||||
item.shoot = ModContent.ProjectileType<AortaProjectile>();
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
item.value = Item.buyPrice(gold: 4);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -12,26 +12,36 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Azathoth");
|
||||
Tooltip.SetDefault("Destroy the universe in the blink of an eye\n" +
|
||||
"Fires cosmic orbs that blast nearby enemies with lasers");
|
||||
Tooltip.SetDefault("Fires cosmic orbs that blast nearby enemies with lasers\nAn exceptionally agile yoyo\n'Destroy the universe in the blink of an eye'");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.Kraken);
|
||||
item.width = 30;
|
||||
item.height = 26;
|
||||
item.melee = true;
|
||||
item.damage = 200;
|
||||
item.knockBack = 6f;
|
||||
item.useTime = 20;
|
||||
item.useAnimation = 20;
|
||||
item.autoReuse = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 6f;
|
||||
item.value = Item.buyPrice(5, 0, 0, 0);
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<AzathothYoyo>();
|
||||
item.shootSpeed = 16f;
|
||||
|
||||
item.rare = 10;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<AzathothProjectile>();
|
||||
item.Calamity().postMoonLordRarity = 16;
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
item.value = Item.buyPrice(platinum: 5);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -11,24 +11,34 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Chaotrix");
|
||||
Tooltip.SetDefault("Explodes on enemy hits");
|
||||
Tooltip.SetDefault("Explodes on enemy hits\nAn exceptionally agile yoyo");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.Yelets);
|
||||
item.damage = 110;
|
||||
item.width = 30;
|
||||
item.height = 26;
|
||||
item.melee = true;
|
||||
item.damage = 88; // 110 pre-nerf
|
||||
item.knockBack = 4f;
|
||||
item.useTime = 22;
|
||||
item.useAnimation = 22;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 4f;
|
||||
item.value = Item.buyPrice(0, 80, 0, 0);
|
||||
item.rare = 8;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<ChaotrixProjectile>();
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<ChaotrixYoyo>();
|
||||
item.shootSpeed = 14f;
|
||||
|
||||
item.rare = 8;
|
||||
item.value = Item.buyPrice(gold: 80);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -12,23 +12,33 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
DisplayName.SetDefault("Cnidarian");
|
||||
Tooltip.SetDefault("Fires a seashell when enemies are near");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.CorruptYoyo);
|
||||
item.width = 30;
|
||||
item.height = 26;
|
||||
item.melee = true;
|
||||
item.damage = 13;
|
||||
item.knockBack = 3f;
|
||||
item.useTime = 25;
|
||||
item.useAnimation = 25;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 3f;
|
||||
item.value = Item.buyPrice(0, 2, 0, 0);
|
||||
item.rare = 2;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<CnidarianProjectile>();
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<CnidarianYoyo>();
|
||||
item.shootSpeed = 10f;
|
||||
|
||||
item.rare = 2;
|
||||
item.value = Item.buyPrice(gold: 2);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public class CrescentMoon : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Crescent Moon");
|
||||
Tooltip.SetDefault("People wanted the moon, let's bring the moon to them.\n" +
|
||||
"Fires a whip sword that summons homing crescent moons");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 16;
|
||||
item.height = 16;
|
||||
item.damage = 500;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.channel = true;
|
||||
item.autoReuse = true;
|
||||
item.melee = true;
|
||||
item.useAnimation = 18;
|
||||
item.useTime = 18;
|
||||
item.useStyle = 5;
|
||||
item.knockBack = 4f;
|
||||
item.UseSound = SoundID.Item82;
|
||||
item.value = Item.buyPrice(1, 40, 0, 0);
|
||||
item.rare = 10;
|
||||
item.Calamity().postMoonLordRarity = 13;
|
||||
item.shootSpeed = 24f;
|
||||
item.shoot = ModContent.ProjectileType<CrescentMoonFlail>();
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
float ai3 = (Main.rand.NextFloat() - 0.5f) * 0.7853982f; //0.5
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, ai3);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<RuinousSoul>(), 8);
|
||||
recipe.AddIngredient(ModContent.ItemType<ExodiumClusterOre>(), 20);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public class DragonPow : ModItem
|
||||
{
|
||||
public static int BaseDamage = 11800;
|
||||
public static int BaseDamage = 7670;
|
||||
public static float Speed = 13f;
|
||||
public static float ReturnSpeed = 20f;
|
||||
public static float SparkSpeed = 0.6f;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 18;
|
||||
item.damage = 1100;
|
||||
item.damage = 600;
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public class GalileoGladius : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Galileo Gladius");
|
||||
Tooltip.SetDefault("Don't underestimate the power of small space swords\n" +
|
||||
"Shoots a homing crescent moon\n" +
|
||||
"Spawns planetoids on enemy hits");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.useStyle = 3;
|
||||
item.useTurn = false;
|
||||
item.useAnimation = 10;
|
||||
item.useTime = 10;
|
||||
item.width = 44;
|
||||
item.height = 44;
|
||||
item.damage = 300;
|
||||
item.melee = true;
|
||||
item.knockBack = 10f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.useTurn = true;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<GalileosMoon>();
|
||||
item.shootSpeed = 14f;
|
||||
item.value = Item.buyPrice(1, 40, 0, 0);
|
||||
item.rare = 10;
|
||||
item.Calamity().postMoonLordRarity = 13;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Projectile.NewProjectile(position.X, position.Y, item.shootSpeed * player.direction, 0f, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<RuinousSoul>(), 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<ExodiumClusterOre>(), 15);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
int num250 = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, (Main.rand.NextBool(2) ? 20 : 176), (float)(player.direction * 2), 0f, 150, default, 1.3f);
|
||||
Main.dust[num250].velocity *= 0.2f;
|
||||
Main.dust[num250].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Nightwither>(), 300);
|
||||
float x = player.position.X + (float)Main.rand.Next(-400, 400);
|
||||
float y = player.position.Y - (float)Main.rand.Next(500, 800);
|
||||
Vector2 vector = new Vector2(x, y);
|
||||
float num15 = player.position.X + (float)(player.width / 2) - vector.X;
|
||||
float num16 = player.position.Y + (float)(player.height / 2) - vector.Y;
|
||||
num15 += (float)Main.rand.Next(-100, 101);
|
||||
int num17 = 25;
|
||||
float num18 = (float)Math.Sqrt((double)(num15 * num15 + num16 * num16));
|
||||
num18 = (float)num17 / num18;
|
||||
num15 *= num18;
|
||||
num16 *= num18;
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (player.Calamity().galileoCooldown <= 0)
|
||||
{
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<GalileosPlanet>(), (int)((float)item.damage * player.meleeDamage * 2f), 15f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
player.Calamity().galileoCooldown = 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 877 B |
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 110;
|
||||
item.damage = 480;
|
||||
item.damage = 300;
|
||||
item.melee = true;
|
||||
item.useAnimation = 18;
|
||||
item.useStyle = 1;
|
||||
|
||||
@@ -11,26 +11,35 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Lacerator");
|
||||
Tooltip.SetDefault("Enemies that are hit by the yoyo will have their life drained\n" +
|
||||
"Someone thought this was a viable weapon against DoG at one point lol");
|
||||
Tooltip.SetDefault("Enemies that are hit by the yoyo will have their life drained\nAn exceptionally agile yoyo\n'Someone thought this was a viable weapon against DoG at one point lol'");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.TheEyeOfCthulhu);
|
||||
item.width = 30;
|
||||
item.height = 26;
|
||||
item.melee = true;
|
||||
item.damage = 150;
|
||||
item.knockBack = 7f;
|
||||
item.useTime = 20;
|
||||
item.useAnimation = 20;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 7f;
|
||||
item.value = Item.buyPrice(1, 40, 0, 0);
|
||||
item.rare = 10;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<LaceratorProjectile>();
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<LaceratorYoyo>();
|
||||
item.shootSpeed = 16f;
|
||||
|
||||
item.rare = 10;
|
||||
item.Calamity().postMoonLordRarity = 13;
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
item.value = Item.buyPrice(platinum: 1, gold: 40);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public class Nadir : ModItem
|
||||
{
|
||||
public static int BaseDamage = 1100;
|
||||
public static int BaseDamage = 800;
|
||||
public static float ShootSpeed = 12f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Projectiles.Melee.Yoyos;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -11,36 +10,38 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public class Oracle : ModItem
|
||||
{
|
||||
public static int BaseDamage = 480;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("The Oracle");
|
||||
Tooltip.SetDefault("Emits an aura of red lightning\nFires auric orbs when supercharged\nHitting enemies charges the yoyo\n'Gaze into the past, the present, the future... and the circumstances of your inevitable demise'");
|
||||
Tooltip.SetDefault("Emits an aura of red lightning which charges up when hitting enemies\nFires auric orbs when supercharged\nAn exceptionally agile yoyo\n'Gaze into the past, the present, the future... and the circumstances of your inevitable demise'");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.Kraken);
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
|
||||
item.width = 54;
|
||||
item.height = 42;
|
||||
item.melee = true;
|
||||
item.damage = BaseDamage;
|
||||
item.damage = 420;
|
||||
item.knockBack = 4f;
|
||||
item.useTime = 20;
|
||||
item.useAnimation = 20;
|
||||
item.autoReuse = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<OracleYoyo>();
|
||||
item.shootSpeed = 16f;
|
||||
|
||||
item.rare = 10;
|
||||
item.Calamity().postMoonLordRarity = 21;
|
||||
item.value = Item.buyPrice(2, 50, 0, 0);
|
||||
|
||||
item.shoot = ModContent.ProjectileType<OracleYoyo>();
|
||||
item.value = Item.buyPrice(platinum: 2, gold: 50);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
|
||||
@@ -12,25 +12,33 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
DisplayName.SetDefault("Quagmire");
|
||||
Tooltip.SetDefault("Fires spore clouds");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.HelFire);
|
||||
item.width = 30;
|
||||
item.height = 36;
|
||||
item.melee = true;
|
||||
item.damage = 52;
|
||||
item.knockBack = 3.5f;
|
||||
item.useTime = 22;
|
||||
item.useAnimation = 22;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 3.5f;
|
||||
item.value = Item.buyPrice(0, 60, 0, 0);
|
||||
item.rare = 7;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<QuagmireProjectile>();
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<QuagmireYoyo>();
|
||||
item.shootSpeed = 10f;
|
||||
|
||||
item.rare = 7;
|
||||
item.value = Item.buyPrice(gold: 60);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 18;
|
||||
item.damage = 2200;
|
||||
item.damage = 1550;
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
|
||||
@@ -12,23 +12,33 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
DisplayName.SetDefault("Shimmerspark");
|
||||
Tooltip.SetDefault("Fires stars when enemies are near");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.Chik);
|
||||
item.width = 50;
|
||||
item.height = 36;
|
||||
item.melee = true;
|
||||
item.damage = 36;
|
||||
item.knockBack = 3.5f;
|
||||
item.useTime = 25;
|
||||
item.useAnimation = 25;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 3.5f;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<ShimmersparkProjectile>();
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<ShimmersparkYoyo>();
|
||||
item.shootSpeed = 12f;
|
||||
|
||||
item.rare = 5;
|
||||
item.value = Item.buyPrice(gold: 36);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -10,25 +10,35 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Solar Flare");
|
||||
Tooltip.SetDefault("Emits large holy explosions on hit");
|
||||
Tooltip.SetDefault("Emits large holy explosions on hit\nAn exceptionally agile yoyo");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.TheEyeOfCthulhu);
|
||||
item.width = 40;
|
||||
item.height = 38;
|
||||
item.melee = true;
|
||||
item.damage = 60;
|
||||
item.knockBack = 7.5f;
|
||||
item.useTime = 20;
|
||||
item.useAnimation = 20;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 7.5f;
|
||||
item.value = Item.buyPrice(1, 20, 0, 0);
|
||||
item.rare = 10;
|
||||
item.autoReuse = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<SolarFlareYoyo>();
|
||||
item.shootSpeed = 16f;
|
||||
|
||||
item.rare = 10;
|
||||
item.Calamity().postMoonLordRarity = 12;
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
item.value = Item.buyPrice(platinum: 1, gold: 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,23 +11,33 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
DisplayName.SetDefault("Oblivion");
|
||||
Tooltip.SetDefault("Fires brimstone lasers when enemies are near");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.TheEyeOfCthulhu);
|
||||
item.width = 28;
|
||||
item.height = 38;
|
||||
item.melee = true;
|
||||
item.damage = 41;
|
||||
item.knockBack = 4f;
|
||||
item.useTime = 22;
|
||||
item.useAnimation = 22;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 4f;
|
||||
item.value = Item.buyPrice(0, 60, 0, 0);
|
||||
item.rare = 7;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<TheEyeofCalamitasProjectile>();
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<OblivionYoyo>();
|
||||
item.shootSpeed = 14f;
|
||||
|
||||
item.rare = 7;
|
||||
item.value = Item.buyPrice(gold: 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,23 +12,33 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
DisplayName.SetDefault("The God's Gambit");
|
||||
Tooltip.SetDefault("Fires a stream of slime when enemies are near");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(3291);
|
||||
item.width = 40;
|
||||
item.height = 26;
|
||||
item.melee = true;
|
||||
item.damage = 28;
|
||||
item.knockBack = 3.5f;
|
||||
item.useTime = 21;
|
||||
item.useAnimation = 21;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 3.5f;
|
||||
item.value = Item.buyPrice(0, 12, 0, 0);
|
||||
item.rare = 4;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<TheGodsGambitProjectile>();
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<GodsGambitYoyo>();
|
||||
item.shootSpeed = 10f;
|
||||
|
||||
item.rare = 4;
|
||||
item.value = Item.buyPrice(gold: 12);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -10,26 +10,35 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("The Microwave");
|
||||
//Tooltip.SetDefault("MMMMMMMMMMMMMM, 13th letter of the alphabet moments");
|
||||
Tooltip.SetDefault("Baking enemies in the astral infection\n\n" +
|
||||
"Summons an aura around the yoyo that damages nearby enemies");
|
||||
//Tooltip.SetDefault("MMMMMMMMMMMMM");
|
||||
Tooltip.SetDefault("Fries nearby enemies with radiation\nAn exceptionally agile yoyo\n'Cooking, Astral Infection style'");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.TheEyeOfCthulhu);
|
||||
item.width = 34;
|
||||
item.height = 34;
|
||||
item.melee = true;
|
||||
item.damage = 80;
|
||||
item.knockBack = 3f;
|
||||
item.useTime = 22;
|
||||
item.useAnimation = 22;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 3f;
|
||||
item.value = Item.buyPrice(0, 95, 0, 0);
|
||||
item.rare = 9;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<TheMicrowaveProj>();
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<MicrowaveYoyo>();
|
||||
item.shootSpeed = 14f;
|
||||
|
||||
item.rare = 9;
|
||||
item.value = Item.buyPrice(gold: 95);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,25 +10,35 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("The Obliterator");
|
||||
Tooltip.SetDefault("Fires death lasers when enemies are near");
|
||||
Tooltip.SetDefault("Ruins nearby enemies with death lasers\nAn exceptionally agile yoyo\n");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.TheEyeOfCthulhu);
|
||||
item.damage = 240;
|
||||
item.width = 42;
|
||||
item.height = 40;
|
||||
item.melee = true;
|
||||
item.damage = 370;
|
||||
item.knockBack = 7.5f;
|
||||
item.useTime = 20;
|
||||
item.useAnimation = 20;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 7.5f;
|
||||
item.value = Item.buyPrice(1, 40, 0, 0);
|
||||
item.rare = 10;
|
||||
item.autoReuse = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<TheObliteratorYoyo>();
|
||||
item.shootSpeed = 16f;
|
||||
|
||||
item.rare = 10;
|
||||
item.Calamity().postMoonLordRarity = 13;
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
item.value = Item.buyPrice(platinum: 1, gold: 40);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,23 +11,33 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
DisplayName.SetDefault("Pandemic");
|
||||
Tooltip.SetDefault("Fires plague seekers when enemies are near");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.TheEyeOfCthulhu);
|
||||
item.width = 30;
|
||||
item.height = 32;
|
||||
item.melee = true;
|
||||
item.damage = 100;
|
||||
item.knockBack = 2.5f;
|
||||
item.useTime = 22;
|
||||
item.useAnimation = 22;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 2.5f;
|
||||
item.value = Item.buyPrice(0, 80, 0, 0);
|
||||
item.rare = 8;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<ThePlaguebringerYoyo>();
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<PandemicYoyo>();
|
||||
item.shootSpeed = 14f;
|
||||
|
||||
item.rare = 8;
|
||||
item.value = Item.buyPrice(gold: 80);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,25 +11,36 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Verdant");
|
||||
Tooltip.SetDefault("Fires crystal leafs when enemies are near");
|
||||
Tooltip.SetDefault("Fires crystal leaves when enemies are near\nAn exceptionally agile yoyo");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.Kraken);
|
||||
item.width = 30;
|
||||
item.height = 30;
|
||||
item.melee = true;
|
||||
item.damage = 218;
|
||||
item.knockBack = 6f;
|
||||
item.useTime = 22;
|
||||
item.useAnimation = 22;
|
||||
item.autoReuse = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 6f;
|
||||
item.value = Item.buyPrice(1, 20, 0, 0);
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<VerdantYoyo>();
|
||||
item.shootSpeed = 16f;
|
||||
|
||||
item.rare = 10;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<VerdantProjectile>();
|
||||
item.Calamity().postMoonLordRarity = 12;
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
item.value = Item.buyPrice(platinum: 1, gold: 20);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -12,26 +12,33 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
DisplayName.SetDefault("Riptide");
|
||||
Tooltip.SetDefault("Sprays a spiral of aqua streams in random directions");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.TheEyeOfCthulhu);
|
||||
item.damage = 18;
|
||||
item.width = 30;
|
||||
item.height = 44;
|
||||
item.value = Item.buyPrice(0, 2, 0, 0);
|
||||
item.rare = 2;
|
||||
item.knockBack = 1f;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.useStyle = 5;
|
||||
item.useAnimation = 25;
|
||||
item.damage = 18;
|
||||
item.knockBack = 1f;
|
||||
item.useTime = 25;
|
||||
item.shoot = ModContent.ProjectileType<WhirlpoolProjectile>();
|
||||
item.shootSpeed = 18f;
|
||||
item.useAnimation = 25;
|
||||
item.autoReuse = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<RiptideYoyo>();
|
||||
item.shootSpeed = 18f;
|
||||
|
||||
item.rare = 2;
|
||||
item.value = Item.buyPrice(gold: 2);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -9,26 +9,36 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("YinYo");
|
||||
DisplayName.SetDefault("Yin-Yo");
|
||||
Tooltip.SetDefault("Fires light or dark shards when enemies are near\n" +
|
||||
"Light shards fly up and down while dark shards fly left and right");
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[item.type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.Chik);
|
||||
item.width = 26;
|
||||
item.height = 24;
|
||||
item.melee = true;
|
||||
item.damage = 34;
|
||||
item.knockBack = 3.5f;
|
||||
item.useTime = 25;
|
||||
item.useAnimation = 25;
|
||||
item.useStyle = 5;
|
||||
item.channel = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 3.5f;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.autoReuse = true;
|
||||
|
||||
item.useStyle = 5;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<YinYoyo>();
|
||||
ItemID.Sets.Yoyo[item.type] = true;
|
||||
item.shootSpeed = 12f;
|
||||
|
||||
item.rare = 5;
|
||||
item.value = Item.buyPrice(gold: 36);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -10,8 +10,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public class AngelicShotgun : ModItem
|
||||
{
|
||||
private static int BaseDamage = 150;
|
||||
private static int NumBullets = 8;
|
||||
private static int BaseDamage = 120;
|
||||
private static float BulletSpeed = 13f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
@@ -32,8 +31,8 @@ Fighting 'til the war's won");
|
||||
item.width = 44;
|
||||
item.height = 7;
|
||||
|
||||
item.useTime = 14;
|
||||
item.useAnimation = 14;
|
||||
item.useTime = 21;
|
||||
item.useAnimation = 21;
|
||||
item.UseSound = SoundID.Item38;
|
||||
item.useStyle = 5;
|
||||
|
||||
@@ -53,6 +52,7 @@ Fighting 'til the war's won");
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int NumBullets = Main.rand.Next(6,9);
|
||||
Vector2 baseVelocity = new Vector2(speedX, speedY).SafeNormalize(Vector2.Zero) * BulletSpeed;
|
||||
|
||||
// Fire a shotgun spread of bullets.
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
default:
|
||||
break;
|
||||
}
|
||||
int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)(damage * 0.5f), knockBack, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[index].noDropItem = true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
item.useAnimation = 25;
|
||||
item.useTime = 25;
|
||||
item.damage = 50;
|
||||
item.damage = 60;
|
||||
item.crit = 8;
|
||||
item.shootSpeed = 8f;
|
||||
item.shoot = ModContent.ProjectileType<BurningStrifeProj>();
|
||||
@@ -40,7 +40,12 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType<BurningStrifeProj>(), damage, knockBack, player.whoAmI);
|
||||
float speedMult = 1f;
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
speedMult = 1.25f;
|
||||
}
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX * speedMult, speedY * speedMult), ModContent.ProjectileType<BurningStrifeProj>(), damage, knockBack, player.whoAmI);
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
Main.projectile[proj].Calamity().stealthStrike = true;
|
||||
|
||||
@@ -53,7 +53,7 @@ Stealth strikes spawn additional bubbles that inflict Ichor and Cursed Inferno")
|
||||
recipe.AddRecipeGroup("AnyEvilWater", 100);
|
||||
recipe.AddIngredient(ItemID.HallowedBar, 5);
|
||||
recipe.AddRecipeGroup("CursedFlameIchor", 5);
|
||||
recipe.AddIngredient(ItemID.SoulofLight, 7);
|
||||
recipe.AddIngredient(ItemID.SoulofNight, 7);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 18;
|
||||
item.damage = 1100;
|
||||
item.damage = 600;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 15;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 64;
|
||||
item.damage = 475;
|
||||
item.damage = 420;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useTime = 3;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
item.value = Item.buyPrice(1, 80, 0, 0);
|
||||
item.rare = 10;
|
||||
|
||||
item.damage = 1800;
|
||||
item.damage = 1600;
|
||||
item.useAnimation = 40;
|
||||
item.useTime = 40;
|
||||
item.crit = 16;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 72;
|
||||
item.damage = 1500;
|
||||
item.damage = 1000;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 13;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 18;
|
||||
item.damage = 2200;
|
||||
item.damage = 1550;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 20;
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
public class ShockGrenade : RogueWeapon
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shock Grenade");
|
||||
Tooltip.SetDefault("Throws a grenade that explodes into a burst of lightning\n" +
|
||||
"Stealth strikes cause the grenade to leave an electrifying aura when it explodes");
|
||||
}
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 14;
|
||||
item.damage = 100;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.consumable = true;
|
||||
item.useAnimation = 18;
|
||||
item.useStyle = 1;
|
||||
item.useTime = 18;
|
||||
item.knockBack = 1f;
|
||||
item.autoReuse = true;
|
||||
item.height = 30;
|
||||
item.maxStack = 999;
|
||||
item.value = Item.buyPrice(0, 1, 0, 0);
|
||||
item.rare = 8;
|
||||
item.shoot = ModContent.ProjectileType<ShockGrenadeProjectile>();
|
||||
item.shootSpeed = 7.5f;
|
||||
item.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[p].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
{
|
||||
Vector2 origin = new Vector2(item.width / 2, item.height / 2);
|
||||
spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Weapons/Rogue/ShockGrenadeGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.Grenade, 10);
|
||||
recipe.AddIngredient(ItemID.MartianConduitPlating, 2);
|
||||
recipe.AddIngredient(ItemID.Nanites, 1);
|
||||
recipe.AddTile(TileID.WorkBenches);
|
||||
recipe.SetResult(this, 10);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 367 B |
|
After Width: | Height: | Size: 172 B |
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
item.value = Item.buyPrice(0, 1, 0, 0);
|
||||
item.rare = 0;
|
||||
item.shoot = ModContent.ProjectileType<SludgeSplotchProj1>();
|
||||
item.shootSpeed = 7.5f;
|
||||
item.shootSpeed = 10f;
|
||||
item.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -42,5 +44,16 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
recipe.SetResult(this, 50);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY) * 1.3f, ModContent.ProjectileType<WulfrumKnifeProj>(), damage, knockBack, player.whoAmI);
|
||||
Main.projectile[proj].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
public class WulfrumController : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Wulfrum Controller");
|
||||
Tooltip.SetDefault("Summons a wulfrum droid to fight for you");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 10;
|
||||
item.mana = 10;
|
||||
item.width = 28;
|
||||
item.height = 20;
|
||||
item.useTime = 36;
|
||||
item.useAnimation = 36;
|
||||
item.useStyle = 4;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 0.5f;
|
||||
item.value = Item.buyPrice(0, 1, 0, 0);
|
||||
item.rare = 1;
|
||||
item.UseSound = SoundID.Item15; //phaseblade sound effect
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<WulfrumDroid>();
|
||||
item.shootSpeed = 10f;
|
||||
item.summon = true;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.altFunctionUse != 2)
|
||||
{
|
||||
position = Main.MouseWorld;
|
||||
speedX = 0;
|
||||
speedY = 0;
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
player.MinionNPCTargetAim();
|
||||
}
|
||||
return base.UseItem(player);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<WulfrumShard>(), 9);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 414 B |
@@ -374,7 +374,8 @@ namespace CalamityMod
|
||||
new List<int>() {ModContent.ItemType<WeaverTrophy>(), ModContent.ItemType<KnowledgeSentinels>()},
|
||||
new List<int>() {ModContent.ItemType<ArmoredShell>(), ModContent.ItemType<TheStorm>(), ModContent.ItemType<StormDragoon>(), ItemID.SuperHealingPotion},
|
||||
"Use a [i:" + ModContent.ItemType<RuneofCos>() + "] in Space",
|
||||
"[c/EE82EE:Storm Weaver hid itself once again within the stormfront.]");
|
||||
"[c/EE82EE:Storm Weaver hid itself once again within the stormfront.]",
|
||||
"CalamityMod/NPCs/StormWeaver/StormWeaver_BossChecklist");
|
||||
|
||||
//Signus
|
||||
bossChecklist.Call(
|
||||
|
||||
@@ -5,6 +5,7 @@ using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
|
||||
namespace CalamityMod.NPCs.Abyss
|
||||
{
|
||||
@@ -209,5 +210,10 @@ namespace CalamityMod.NPCs.Abyss
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<AbyssShocker>(), NPC.downedBoss3, Main.expertMode ? 40 : 50, 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Banners;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -194,6 +195,7 @@ namespace CalamityMod.NPCs.Abyss
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<AbyssShocker>(), NPC.downedBoss3, 10, 1, 1);
|
||||
if (Main.rand.NextBool(1000000) && CalamityWorld.revenge)
|
||||
{
|
||||
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType<HalibutCannon>());
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace CalamityMod.NPCs
|
||||
public int silvaStun = 0;
|
||||
public int webbed = 0;
|
||||
public int slowed = 0;
|
||||
public int electrified = 0;
|
||||
public int yellowCandle = 0;
|
||||
public int pearlAura = 0;
|
||||
public int wCleave = 0;
|
||||
@@ -544,6 +545,10 @@ namespace CalamityMod.NPCs
|
||||
ApplyDPSDebuff(dFlames, 2500, 500, ref npc.lifeRegen, ref damage);
|
||||
ApplyDPSDebuff(bBlood, 50, 10, ref npc.lifeRegen, ref damage);
|
||||
ApplyDPSDebuff(sulphurPoison, 180, 36, ref npc.lifeRegen, ref damage);
|
||||
if (npc.velocity.X == 0)
|
||||
ApplyDPSDebuff(electrified, 4, 2, ref npc.lifeRegen, ref damage);
|
||||
else
|
||||
ApplyDPSDebuff(electrified, 16, 16, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
|
||||
public void ApplyDPSDebuff(int debuff, int lifeRegenValue, int damageValue, ref int lifeRegen, ref int damage)
|
||||
@@ -611,6 +616,7 @@ namespace CalamityMod.NPCs
|
||||
npc.buffImmune[ModContent.BuffType<TimeSlow>()] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Electrified] = true;
|
||||
}
|
||||
|
||||
if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC)
|
||||
@@ -2121,6 +2127,8 @@ namespace CalamityMod.NPCs
|
||||
webbed--;
|
||||
if (slowed > 0)
|
||||
slowed--;
|
||||
if (electrified > 0)
|
||||
electrified--;
|
||||
if (yellowCandle > 0)
|
||||
yellowCandle--;
|
||||
if (pearlAura > 0)
|
||||
@@ -3189,6 +3197,21 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
}
|
||||
if (electrified > 0)
|
||||
{
|
||||
if (Main.rand.Next(5) < 4)
|
||||
{
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, 132, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 0, default, 1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 1.1f;
|
||||
Main.dust[dust].velocity.Y += 0.25f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].scale *= 0.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gState > 0 || eFreeze > 0)
|
||||
{
|
||||
|
||||
@@ -1667,6 +1667,18 @@ namespace CalamityMod.NPCs
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<DarksunFragment>(), CalamityWorld.downedBuffedMothron, Main.expertMode ? 0.06f : 0.04f, 1, 1);
|
||||
break;
|
||||
|
||||
case NPCID.MartianOfficer:
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<ShockGrenade>(), Main.expertMode ? 3 : 4, 3, 8);
|
||||
break;
|
||||
case NPCID.BrainScrambler:
|
||||
case NPCID.GrayGrunt:
|
||||
case NPCID.GigaZapper:
|
||||
case NPCID.MartianEngineer:
|
||||
case NPCID.RayGunner:
|
||||
case NPCID.ScutlixRider:
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<ShockGrenade>(), Main.expertMode ? 4 : 5, 1, 4);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -43,6 +43,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -44,6 +44,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -42,6 +42,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace CalamityMod.NPCs.Perforator
|
||||
npc.alpha = 255;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.behindTiles = true;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
aiType = -1;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.knockBackResist = 0f;
|
||||
animationType = 50;
|
||||
npc.value = 0f;
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
animationType = 50;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
npc.value = 0f;
|
||||
npc.alpha = 60;
|
||||
npc.lavaImmune = false;
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.knockBackResist = 0f;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
animationType = 50;
|
||||
npc.value = Item.buyPrice(0, 1, 0, 0);
|
||||
npc.alpha = 60;
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.knockBackResist = 0f;
|
||||
npc.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
npc.buffImmune[ModContent.BuffType<TemporalSadness>()] = true;
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
npc.buffImmune[BuffID.Webbed] = true;
|
||||
animationType = 50;
|
||||
npc.value = Item.buyPrice(0, 1, 0, 0);
|
||||
npc.alpha = 60;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.World;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.IO;
|
||||
@@ -257,6 +258,10 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
damage /= projectile.penetrate;
|
||||
}
|
||||
if (projectile.type == ModContent.ProjectileType<AlphaVirusProjectile>())
|
||||
{
|
||||
damage /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Furniture.Trophies;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.World;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.IO;
|
||||
@@ -553,6 +554,10 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
damage /= projectile.penetrate;
|
||||
}
|
||||
if (projectile.type == ModContent.ProjectileType<AlphaVirusProjectile>())
|
||||
{
|
||||
damage /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.World;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.IO;
|
||||
@@ -245,6 +246,10 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
damage /= projectile.penetrate;
|
||||
}
|
||||
if (projectile.type == ModContent.ProjectileType<AlphaVirusProjectile>())
|
||||
{
|
||||
damage /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
|
After Width: | Height: | Size: 5.0 KiB |
@@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shadowflame");
|
||||
DisplayName.SetDefault("Shadowflame Fireball");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -34,8 +34,28 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Main.PlaySound(SoundID.Item20, projectile.position);
|
||||
}
|
||||
|
||||
int dust = Dust.NewDust(new Vector2(projectile.position.X + projectile.velocity.X, projectile.position.Y + projectile.velocity.Y), projectile.width, projectile.height, 27, projectile.velocity.X, projectile.velocity.Y, 100, default, 3f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
// Main chunky dark purple dust at the front of the fireball
|
||||
for(int i = 0; i < 2; ++i)
|
||||
{
|
||||
int dustType = 27;
|
||||
float dustScale = Main.rand.NextFloat(1.4f, 2.4f);
|
||||
int dustID = Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, dustType);
|
||||
Main.dust[dustID].noGravity = true;
|
||||
Main.dust[dustID].velocity = projectile.velocity;
|
||||
Main.dust[dustID].scale = dustScale;
|
||||
}
|
||||
|
||||
// Trailing brighter purple fire trail dust
|
||||
{
|
||||
int dustType = 70;
|
||||
float velMult = Main.rand.NextFloat(0.05f, 0.6f);
|
||||
float dustScale = Main.rand.NextFloat(1.2f, 1.8f);
|
||||
int dustID = Dust.NewDust(projectile.position, projectile.width, projectile.height, dustType);
|
||||
Main.dust[dustID].noGravity = true;
|
||||
Main.dust[dustID].velocity *= 0.1f;
|
||||
Main.dust[dustID].velocity += projectile.velocity * velMult;
|
||||
Main.dust[dustID].scale = dustScale;
|
||||
}
|
||||
|
||||
projectile.rotation += 0.3f * (float)projectile.direction;
|
||||
|
||||
@@ -77,17 +97,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item10, projectile.position);
|
||||
int num3;
|
||||
for (int num584 = 0; num584 < 20; num584 = num3 + 1)
|
||||
int killDust = 20;
|
||||
for (int i = 0; i < killDust; ++i)
|
||||
{
|
||||
int num585 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 27, -projectile.velocity.X * 0.2f, -projectile.velocity.Y * 0.2f, 100, default, 2.5f);
|
||||
Main.dust[num585].noGravity = true;
|
||||
Dust dust = Main.dust[num585];
|
||||
dust.velocity *= 2f;
|
||||
num585 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 27, -projectile.velocity.X * 0.2f, -projectile.velocity.Y * 0.2f, 100, default, 1.2f);
|
||||
dust = Main.dust[num585];
|
||||
dust.velocity *= 2f;
|
||||
num3 = num584;
|
||||
int dustType = Main.rand.NextBool() ? 70 : 27;
|
||||
float dustScale = Main.rand.NextFloat(1f, 1.6f);
|
||||
int dustID = Dust.NewDust(projectile.Center, 1, 1, dustType);
|
||||
Main.dust[dustID].velocity *= 4f;
|
||||
Main.dust[dustID].scale = dustScale;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Shadowflamethrower");
|
||||
DisplayName.SetDefault("Shadowflame Breath");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -27,43 +27,42 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
if (projectile.ai[0] > 7f)
|
||||
{
|
||||
float num302 = 1f;
|
||||
if (projectile.ai[0] == 8f)
|
||||
num302 = 0.25f;
|
||||
else if (projectile.ai[0] == 9f)
|
||||
num302 = 0.5f;
|
||||
else if (projectile.ai[0] == 10f)
|
||||
num302 = 0.75f;
|
||||
|
||||
projectile.ai[0] += 1f;
|
||||
if (Main.rand.NextBool(2))
|
||||
int[] dustTypes = new int[] { 27, 27, 112, 173 };
|
||||
if(true)
|
||||
{
|
||||
int num305 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 27, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f);
|
||||
Dust dust;
|
||||
|
||||
if (Main.rand.Next(3) != 0 || Main.rand.NextBool(3))
|
||||
int dustType = dustTypes[Main.rand.Next(4)];
|
||||
int dustID;
|
||||
Vector2 corner = projectile.position - new Vector2(6f, 6f);
|
||||
int width = 18;
|
||||
int height = 18;
|
||||
switch (dustType)
|
||||
{
|
||||
Main.dust[num305].noGravity = true;
|
||||
dust = Main.dust[num305];
|
||||
dust.scale *= 3f;
|
||||
dust.velocity.X *= 2f;
|
||||
dust.velocity.Y *= 2f;
|
||||
case 27:
|
||||
dustID = Dust.NewDust(corner, width, height, dustType);
|
||||
Main.dust[dustID].noGravity = false;
|
||||
Main.dust[dustID].scale = Main.rand.NextFloat(1f, 1.2f);
|
||||
Main.dust[dustID].velocity *= 0.9f;
|
||||
Main.dust[dustID].velocity += projectile.velocity * 0.7f;
|
||||
break;
|
||||
case 112:
|
||||
dustID = Dust.NewDust(projectile.position, projectile.width, projectile.height, dustType);
|
||||
Main.dust[dustID].noGravity = true;
|
||||
Main.dust[dustID].scale = Main.rand.NextFloat(1.4f, 2f);
|
||||
Main.dust[dustID].velocity *= 2.2f;
|
||||
Main.dust[dustID].velocity += projectile.velocity * Main.rand.NextFloat(0.15f, 0.4f);
|
||||
break;
|
||||
case 173:
|
||||
dustID = Dust.NewDust(projectile.position, projectile.width, projectile.height, dustType);
|
||||
Main.dust[dustID].noGravity = false;
|
||||
Main.dust[dustID].scale = Main.rand.NextFloat(1.9f, 3f);
|
||||
Main.dust[dustID].velocity *= 1.5f;
|
||||
Main.dust[dustID].velocity += projectile.velocity * Main.rand.NextFloat(0.6f, 1f);
|
||||
break;
|
||||
}
|
||||
|
||||
dust = Main.dust[num305];
|
||||
dust.scale *= 2f;
|
||||
dust.velocity.X *= 1.2f;
|
||||
dust.velocity.Y *= 1.2f;
|
||||
dust.scale *= num302;
|
||||
dust.velocity += projectile.velocity;
|
||||
|
||||
if (!dust.noGravity)
|
||||
dust.velocity *= 0.5f;
|
||||
}
|
||||
}
|
||||
else
|
||||
projectile.ai[0] += 1f;
|
||||
|
||||
projectile.ai[0]++;
|
||||
projectile.rotation += 0.3f * (float)projectile.direction;
|
||||
}
|
||||
|
||||
|
||||
@@ -656,10 +656,10 @@ namespace CalamityMod.Projectiles
|
||||
{
|
||||
if (counter % 30 == 0)
|
||||
{
|
||||
if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].ownedProjectileCounts[ModContent.ProjectileType<Nanotech>()] < 30)
|
||||
if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].ownedProjectileCounts[ModContent.ProjectileType<Nanotech>()] < 25)
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<Nanotech>(),
|
||||
(int)((double)projectile.damage * 0.15), 0f, projectile.owner, 0f, 0f);
|
||||
(int)((double)projectile.damage * 0.1), 0f, projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1450,12 +1450,13 @@ namespace CalamityMod.Projectiles
|
||||
Player playerC = Main.player[projectile.owner];
|
||||
if (playerC.Calamity().featherCrown && stealthStrike && playerC.Calamity().featherCrownCooldown <= 0)
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
Vector2 pos = new Vector2(target.Center.X + (float)target.width * 0.5f + (float)Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
||||
float speedX = (target.Center.X - pos.X) / 30f;
|
||||
float speedY = (target.Center.Y - pos.Y) * 8;
|
||||
int feather = Projectile.NewProjectile(pos.X, pos.Y, speedX, speedY, ModContent.ProjectileType<StickyFeather>(), 15, 3, projectile.owner, 0f, (float)Main.rand.Next(15));
|
||||
int dmg = (int)(15 + (projectile.damage * 0.05f));
|
||||
int feather = Projectile.NewProjectile(pos.X, pos.Y, speedX, speedY, ModContent.ProjectileType<StickyFeather>(), dmg, 3, projectile.owner, 0f, (float)Main.rand.Next(15));
|
||||
Main.projectile[feather].Calamity().forceRogue = true;
|
||||
playerC.Calamity().featherCrownCooldown = 15;
|
||||
}
|
||||
@@ -1463,16 +1464,30 @@ namespace CalamityMod.Projectiles
|
||||
|
||||
if (playerC.Calamity().moonCrown && stealthStrike && playerC.Calamity().moonCrownCooldown <= 0)
|
||||
{
|
||||
for (int i = 0; i < 20; i++)
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
Vector2 pos = new Vector2(target.Center.X + (float)target.width * 0.5f + (float)Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
||||
Vector2 velocity = (target.Center - pos) / 10f;
|
||||
float AI1 = (float)Main.rand.Next(3);
|
||||
int flare = Projectile.NewProjectile(pos, velocity, ProjectileID.LunarFlare, 50, 3, projectile.owner, 0f, AI1);
|
||||
int dmg = (int)(150 + (projectile.damage * 0.05f));
|
||||
int flare = Projectile.NewProjectile(pos, velocity, ProjectileID.LunarFlare, dmg, 3, projectile.owner, 0f, AI1);
|
||||
Main.projectile[flare].Calamity().forceRogue = true;
|
||||
playerC.Calamity().moonCrownCooldown = 15;
|
||||
}
|
||||
}
|
||||
|
||||
if (playerC.Calamity().nanotech && stealthStrike && playerC.Calamity().nanoFlareCooldown <= 0)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
Vector2 pos = new Vector2(target.Center.X + (float)target.width * 0.5f + (float)Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
|
||||
Vector2 velocity = (target.Center - pos) / 40f;
|
||||
int dmg = (int)(1000 + (projectile.damage * 0.05f));
|
||||
int flare = Projectile.NewProjectile(pos, velocity, ModContent.ProjectileType<NanoFlare>(),dmg, 3f, projectile.owner, 0f, 0f);
|
||||
Main.projectile[flare].Calamity().rogue = true;
|
||||
playerC.Calamity().nanoFlareCooldown = 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type))
|
||||
{
|
||||
|
||||
@@ -22,12 +22,14 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.width = 10;
|
||||
projectile.height = 10;
|
||||
projectile.friendly = true;
|
||||
projectile.penetrate = 8;
|
||||
projectile.penetrate = -1;
|
||||
projectile.alpha = 255;
|
||||
projectile.magic = true;
|
||||
projectile.aiStyle = 93;
|
||||
aiType = 514;
|
||||
projectile.extraUpdates = 1;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class Crescent : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Crescent Cutter");
|
||||
ProjectileID.Sets.TrailCacheLength[projectile.type] = 5;
|
||||
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.friendly = true;
|
||||
projectile.timeLeft = 200;
|
||||
projectile.aiStyle = 0;
|
||||
projectile.width = 20;
|
||||
projectile.height = 20;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.tileCollide = false;
|
||||
projectile.knockBack = 0;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
return new Color(230, 230, 255, projectile.alpha);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Projectile parent = Main.projectile[(int)projectile.ai[0]];
|
||||
if (!parent.active) projectile.Kill();
|
||||
|
||||
projectile.rotation += 0.7f;
|
||||
|
||||
projectile.ai[1]++;
|
||||
|
||||
if (projectile.ai[1] > 20)
|
||||
{
|
||||
projectile.velocity += projectile.DirectionTo(parent.Center) * 2.5f;
|
||||
if (projectile.Distance(parent.Center) < 75f) projectile.active = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 660 B |
@@ -0,0 +1,160 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class LightningArc : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Lightning Arc");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 8;
|
||||
projectile.height = 8;
|
||||
projectile.alpha = 255;
|
||||
projectile.friendly = true;
|
||||
projectile.tileCollide = false;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.magic = true;
|
||||
projectile.timeLeft = 20;
|
||||
projectile.penetrate = 6;
|
||||
projectile.tileCollide = true;
|
||||
}
|
||||
|
||||
|
||||
HashSet<NPC> shockedbefore = new HashSet<NPC>();
|
||||
int prevX = 0;
|
||||
public override void AI()
|
||||
{
|
||||
//projectile.alpha exists
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
AdjustMagnitude(ref projectile.velocity);
|
||||
projectile.localAI[0] = 1f;
|
||||
}
|
||||
Vector2 move = Vector2.Zero;
|
||||
float distance = 160f;
|
||||
bool target = false;
|
||||
NPC npc = null;
|
||||
bool pastNPC = false;
|
||||
if (projectile.timeLeft < 18) {
|
||||
for (int k = 0; k < 200; k++)
|
||||
{
|
||||
if (Main.npc[k].active && !Main.npc[k].dontTakeDamage && !Main.npc[k].friendly && Main.npc[k].lifeMax > 5 && !shockedbefore.Contains(Main.npc[k]))
|
||||
{
|
||||
Vector2 newMove = Main.npc[k].Center - (projectile.velocity + projectile.Center);
|
||||
float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y);
|
||||
if (distanceTo < distance)
|
||||
{
|
||||
move = newMove;
|
||||
distance = distanceTo;
|
||||
target = true;
|
||||
npc = Main.npc[k];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//if not found, lokk thru npcs that have been shocked before
|
||||
if (!target) {
|
||||
foreach (NPC pastnpc in shockedbefore) {
|
||||
Vector2 newMove = pastnpc.Center -(projectile.velocity + projectile.Center);
|
||||
float distanceTo = (float)Math.Sqrt(newMove.X * newMove.X + newMove.Y * newMove.Y);
|
||||
if (distanceTo < distance)
|
||||
{
|
||||
move = newMove;
|
||||
distance = distanceTo;
|
||||
target = true;
|
||||
npc = pastnpc;
|
||||
pastNPC = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Main.dust[dust].velocity /= 2f;
|
||||
Vector2 current = projectile.Center;
|
||||
if (target)
|
||||
{
|
||||
shockedbefore.Add(npc);
|
||||
npc.HitEffect(0, projectile.damage);
|
||||
//AdjustMagnitude(ref move);
|
||||
//AdjustMagnitude(ref projectile.velocity);
|
||||
//projectile.velocity = (10 * projectile.velocity + move) / 11f;
|
||||
|
||||
move+= new Vector2(Main.rand.Next(-10, 10), Main.rand.Next(-10, 10))*distance/30;
|
||||
if (pastNPC) {
|
||||
prevX++;
|
||||
move += new Vector2(Main.rand.Next(-10, 10), Main.rand.Next(-10, 10)) * prevX;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
move = (projectile.velocity+ new Vector2(Main.rand.Next(-10, 10), Main.rand.Next(-10, 10)))*5;
|
||||
}
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(current, projectile.width, projectile.height, 20, 0, 0);
|
||||
Main.dust[dust].velocity = new Vector2(0);
|
||||
current += move / 20f;
|
||||
}
|
||||
projectile.position = current;
|
||||
/*int tx = (int)(projectile.position.X / 16f);
|
||||
int ty = (int)(projectile.position.Y / 16f);
|
||||
|
||||
if (tx < 0)
|
||||
{
|
||||
tx = 0;
|
||||
}
|
||||
if (tx > Main.maxTilesX)
|
||||
{
|
||||
tx = Main.maxTilesX;
|
||||
}
|
||||
if (ty < 0)
|
||||
{
|
||||
ty = 0;
|
||||
}
|
||||
if (ty > Main.maxTilesY)
|
||||
{
|
||||
ty = Main.maxTilesY;
|
||||
}
|
||||
|
||||
if (Main.tile[tx, ty] != null && Main.tileSolid[(int)Main.tile[tx,ty].type] && Main.tile[tx, ty].wall == 0)
|
||||
{
|
||||
projectile.timeLeft -= 12;
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
projectile.velocity = oldVelocity;
|
||||
projectile.timeLeft -= 12;
|
||||
return false;
|
||||
}
|
||||
private void AdjustMagnitude(ref Vector2 vector)
|
||||
{
|
||||
float magnitude = (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y);
|
||||
if (magnitude > 6f)
|
||||
{
|
||||
vector *= 6f / magnitude;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
target.AddBuff(BuffID.Electrified, 300);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 251 B |
@@ -0,0 +1,135 @@
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class StratusSphereProj : ModProjectile
|
||||
{
|
||||
int roundsGone = 0;
|
||||
int dust_nut = 0;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Stratus Sphere");
|
||||
Main.projFrames[projectile.type] = 6;
|
||||
ProjectileID.Sets.TrailCacheLength[projectile.type] = 5;
|
||||
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.hostile = false;
|
||||
projectile.friendly = true;
|
||||
projectile.aiStyle = -1;
|
||||
projectile.width = 314;
|
||||
projectile.height = 198;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.tileCollide = false;
|
||||
projectile.knockBack = 0;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
return new Color(230, 230, 255, projectile.alpha);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
projectile.ai[0]++;
|
||||
|
||||
if (projectile.ai[0] < 200)
|
||||
{
|
||||
if (projectile.ai[0] > 100)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X * 40 / 41;
|
||||
projectile.velocity.Y = projectile.velocity.Y * 45 / 46 - 0.005f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X * 10 / 11;
|
||||
projectile.velocity.Y = projectile.velocity.Y * 10 / 11;
|
||||
if (roundsGone <= 4) projectile.ai[1]++;
|
||||
int rand = Main.rand.Next(-50, 51);
|
||||
int rand2 = Main.rand.Next(-50, 51);
|
||||
Vector2 targetDir = projectile.Center + new Vector2(rand, rand2);
|
||||
if (projectile.ai[1] > 40)
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(targetDir) * 12f, ModContent.ProjectileType<Crescent>(), projectile.damage / 2, 0.4f, projectile.owner, projectile.whoAmI);
|
||||
}
|
||||
if (projectile.ai[1] > 46)
|
||||
{
|
||||
projectile.ai[1] = 0;
|
||||
roundsGone++;
|
||||
}
|
||||
if (roundsGone > 4 && Main.player[projectile.owner].ownedProjectileCounts[ModContent.ProjectileType<Crescent>()] == 0) projectile.Kill();
|
||||
}
|
||||
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter >= 4)
|
||||
{
|
||||
projectile.frame++;
|
||||
projectile.frameCounter = 0;
|
||||
if (projectile.frame >= 6)
|
||||
{
|
||||
projectile.frame = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (Main.rand.NextFloat() < 1f)
|
||||
{
|
||||
Dust dust;
|
||||
// You need to set position depending on what you are doing. You may need to subtract width/2 and height/2 as well to center the spawn rectangle.
|
||||
Vector2 position = projectile.Center;
|
||||
dust = Main.dust[Terraria.Dust.NewDust(position, 0, 0, 226, 0f, 0f, 0, new Color(255, 255, 255), 0.7236842f)];
|
||||
}
|
||||
|
||||
dust_nut++;
|
||||
|
||||
if (dust_nut > 22)
|
||||
{
|
||||
int num20 = 36;
|
||||
for (int i = 0; i < num20; i++)
|
||||
{
|
||||
Vector2 spinningpoint = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f * 0.5f;
|
||||
spinningpoint = spinningpoint.RotatedBy((double)((float)(i - (num20 / 2 - 1)) * 6.28318548f / (float)num20), default(Vector2)) + projectile.Center;
|
||||
Vector2 vector = spinningpoint - projectile.Center;
|
||||
int num21 = Dust.NewDust(spinningpoint + vector, 0, 0, 226, vector.X * 2f, vector.Y * 2f, 0, new Color(255, 255, 255), 0.7236842f);
|
||||
Main.dust[num21].noGravity = true;
|
||||
Main.dust[num21].noLight = true;
|
||||
Main.dust[num21].velocity = Vector2.Normalize(vector) * 3f;
|
||||
}
|
||||
dust_nut = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
for (int i = 0; i < 25; i++)
|
||||
{
|
||||
Dust dust;
|
||||
// You need to set position depending on what you are doing. You may need to subtract width/2 and height/2 as well to center the spawn rectangle.
|
||||
Vector2 position = projectile.Center - new Vector2(34, 34);
|
||||
dust = Main.dust[Terraria.Dust.NewDust(position, 68, 68, 226, 0f, 0f, 0, new Color(255, 255, 255), 0.7236842f)];
|
||||
}
|
||||
|
||||
int num20 = 36;
|
||||
for (int i = 0; i < num20; i++)
|
||||
{
|
||||
Vector2 spinningpoint = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f * 0.5f;
|
||||
spinningpoint = spinningpoint.RotatedBy((double)((float)(i - (num20 / 2 - 1)) * 6.28318548f / (float)num20), default(Vector2)) + projectile.Center;
|
||||
Vector2 vector = spinningpoint - projectile.Center;
|
||||
int num21 = Dust.NewDust(spinningpoint + vector, 0, 0, 226, vector.X * 2f, vector.Y * 2f, 0, new Color(255, 255, 255), 0.7236842f);
|
||||
Main.dust[num21].noGravity = true;
|
||||
Main.dust[num21].noLight = true;
|
||||
Main.dust[num21].velocity = Vector2.Normalize(vector) * 3f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 29 KiB |
@@ -0,0 +1,242 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
public class CrescentMoonFlail : ModProjectile
|
||||
{
|
||||
public int moonCounter = 6;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Crescent Moon");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 16;
|
||||
projectile.height = 16;
|
||||
projectile.friendly = true;
|
||||
projectile.alpha = 255;
|
||||
projectile.penetrate = -1;
|
||||
projectile.hide = true;
|
||||
projectile.tileCollide = false;
|
||||
projectile.melee = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 3;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Player player = Main.player[projectile.owner];
|
||||
float num = 1.57079637f;
|
||||
Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
if (projectile.localAI[1] > 0f)
|
||||
{
|
||||
projectile.localAI[1] -= 1f;
|
||||
}
|
||||
projectile.alpha -= 42;
|
||||
if (projectile.alpha < 0)
|
||||
{
|
||||
projectile.alpha = 0;
|
||||
}
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.localAI[0] = projectile.velocity.ToRotation();
|
||||
}
|
||||
float num32 = (float)((projectile.localAI[0].ToRotationVector2().X >= 0f) ? 1 : -1);
|
||||
if (projectile.ai[1] <= 0f)
|
||||
{
|
||||
num32 *= -1f;
|
||||
}
|
||||
Vector2 vector17 = (num32 * (projectile.ai[0] / 30f * 6.28318548f - 1.57079637f)).ToRotationVector2();
|
||||
vector17.Y *= (float)Math.Sin((double)projectile.ai[1]);
|
||||
if (projectile.ai[1] <= 0f)
|
||||
{
|
||||
vector17.Y *= -1f;
|
||||
}
|
||||
vector17 = vector17.RotatedBy((double)projectile.localAI[0], default);
|
||||
projectile.ai[0] += 1f;
|
||||
if (projectile.ai[0] < 30f)
|
||||
{
|
||||
projectile.velocity += 48f * vector17;
|
||||
}
|
||||
else
|
||||
{
|
||||
projectile.Kill();
|
||||
}
|
||||
projectile.position = player.RotatedRelativePoint(player.MountedCenter, true) - projectile.Size / 2f;
|
||||
projectile.rotation = projectile.velocity.ToRotation() + num;
|
||||
projectile.spriteDirection = projectile.direction;
|
||||
projectile.timeLeft = 2;
|
||||
player.ChangeDir(projectile.direction);
|
||||
player.heldProj = projectile.whoAmI;
|
||||
player.itemTime = 2;
|
||||
player.itemAnimation = 2;
|
||||
player.itemRotation = (float)Math.Atan2((double)(projectile.velocity.Y * (float)projectile.direction), (double)(projectile.velocity.X * (float)projectile.direction));
|
||||
Vector2 vector24 = Main.OffsetsPlayerOnhand[player.bodyFrame.Y / 56] * 2f;
|
||||
if (player.direction != 1)
|
||||
{
|
||||
vector24.X = (float)player.bodyFrame.Width - vector24.X;
|
||||
}
|
||||
if (player.gravDir != 1f)
|
||||
{
|
||||
vector24.Y = (float)player.bodyFrame.Height - vector24.Y;
|
||||
}
|
||||
vector24 -= new Vector2((float)(player.bodyFrame.Width - player.width), (float)(player.bodyFrame.Height - 42)) / 2f;
|
||||
projectile.Center = player.RotatedRelativePoint(player.position + vector24, true) - projectile.velocity;
|
||||
if (projectile.alpha == 0)
|
||||
{
|
||||
for (int num51 = 0; num51 < 2; num51++)
|
||||
{
|
||||
Dust dust = Main.dust[Dust.NewDust(projectile.position + projectile.velocity * 2f, projectile.width, projectile.height, 176, 0f, 0f, 100, default, 2f)];
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 2f;
|
||||
dust.velocity += projectile.localAI[0].ToRotationVector2();
|
||||
dust.fadeIn = 1.5f;
|
||||
}
|
||||
float num52 = 18f;
|
||||
int num53 = 0;
|
||||
while ((float)num53 < num52)
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Vector2 position = projectile.position + projectile.velocity + projectile.velocity * ((float)num53 / num52);
|
||||
Dust dust2 = Main.dust[Dust.NewDust(position, projectile.width, projectile.height, 20, 0f, 0f, 100, default, 1f)];
|
||||
dust2.noGravity = true;
|
||||
dust2.fadeIn = 0.5f;
|
||||
dust2.velocity += projectile.localAI[0].ToRotationVector2();
|
||||
dust2.noLight = true;
|
||||
}
|
||||
num53++;
|
||||
}
|
||||
}
|
||||
if (moonCounter > 0)
|
||||
moonCounter--;
|
||||
if (moonCounter <= 0 && projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Vector2 vectorBruh = Main.OffsetsPlayerOnhand[player.bodyFrame.Y / 56] * 2f;
|
||||
if (player.direction != 1)
|
||||
{
|
||||
vectorBruh.X = (float)player.bodyFrame.Width - vectorBruh.X;
|
||||
}
|
||||
if (player.gravDir != 1f)
|
||||
{
|
||||
vectorBruh.Y = (float)player.bodyFrame.Height - vectorBruh.Y;
|
||||
}
|
||||
vectorBruh -= new Vector2((float)(player.bodyFrame.Width - player.width), (float)(player.bodyFrame.Height - 42)) / 2f;
|
||||
Vector2 newCenter = player.RotatedRelativePoint(Main.player[projectile.owner].position + vectorBruh, true) + projectile.velocity;
|
||||
int moon = Projectile.NewProjectile(newCenter.X, newCenter.Y, 0f, 0f, ModContent.ProjectileType<CrescentMoonProj>(), (int)((double)projectile.damage * 0.4), 0f, projectile.owner, 0f, 0f);
|
||||
moonCounter = 6;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
Vector2 mountedCenter = Main.player[projectile.owner].MountedCenter;
|
||||
Color color25 = Lighting.GetColor((int)((double)projectile.position.X + (double)projectile.width * 0.5) / 16, (int)(((double)projectile.position.Y + (double)projectile.height * 0.5) / 16.0));
|
||||
if (projectile.hide && !ProjectileID.Sets.DontAttachHideToAlpha[projectile.type])
|
||||
{
|
||||
color25 = Lighting.GetColor((int)mountedCenter.X / 16, (int)(mountedCenter.Y / 16f));
|
||||
}
|
||||
Vector2 projPos = projectile.position;
|
||||
projPos = new Vector2((float)projectile.width, (float)projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; //fuck it
|
||||
Texture2D texture2D22 = Main.projectileTexture[projectile.type];
|
||||
Color alpha3 = projectile.GetAlpha(color25);
|
||||
if (projectile.velocity == Vector2.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
float num230 = projectile.velocity.Length() + 16f;
|
||||
bool flag24 = num230 < 100f;
|
||||
Vector2 value28 = Vector2.Normalize(projectile.velocity);
|
||||
Rectangle rectangle8 = new Rectangle(0, 0, texture2D22.Width, 54); //2 and 40
|
||||
Vector2 value29 = new Vector2(0f, Main.player[projectile.owner].gfxOffY);
|
||||
float rotation24 = projectile.rotation + 3.14159274f;
|
||||
Main.spriteBatch.Draw(texture2D22, projectile.Center.Floor() - Main.screenPosition + value29, new Microsoft.Xna.Framework.Rectangle?(rectangle8), alpha3, rotation24, rectangle8.Size() / 2f - Vector2.UnitY * 4f, projectile.scale, SpriteEffects.None, 0f);
|
||||
num230 -= 40f * projectile.scale;
|
||||
Vector2 vector31 = projectile.Center.Floor();
|
||||
vector31 += value28 * projectile.scale * 24f;
|
||||
rectangle8 = new Rectangle(0, 84, texture2D22.Width, 18); //68 and 18
|
||||
if (num230 > 0f)
|
||||
{
|
||||
float num231 = 0f;
|
||||
while (num231 + 1f < num230)
|
||||
{
|
||||
if (num230 - num231 < (float)rectangle8.Height)
|
||||
{
|
||||
rectangle8.Height = (int)(num230 - num231);
|
||||
}
|
||||
Main.spriteBatch.Draw(texture2D22, vector31 - Main.screenPosition + value29, new Microsoft.Xna.Framework.Rectangle?(rectangle8), alpha3, rotation24, new Vector2((float)(rectangle8.Width / 2), 0f), projectile.scale, SpriteEffects.None, 0f);
|
||||
num231 += (float)rectangle8.Height * projectile.scale;
|
||||
vector31 += value28 * (float)rectangle8.Height * projectile.scale;
|
||||
}
|
||||
}
|
||||
Vector2 value30 = vector31;
|
||||
vector31 = projectile.Center.Floor();
|
||||
vector31 += value28 * projectile.scale * 24f;
|
||||
rectangle8 = new Rectangle(0, 62, texture2D22.Width, 20); //46 and 18
|
||||
int num232 = 18;
|
||||
if (flag24)
|
||||
{
|
||||
num232 = 9;
|
||||
}
|
||||
float num233 = num230;
|
||||
if (num230 > 0f)
|
||||
{
|
||||
float num234 = 0f;
|
||||
float num235 = num233 / (float)num232;
|
||||
num234 += num235 * 0.25f;
|
||||
vector31 += value28 * num235 * 0.25f;
|
||||
for (int num236 = 0; num236 < num232; num236++)
|
||||
{
|
||||
float num237 = num235;
|
||||
if (num236 == 0)
|
||||
{
|
||||
num237 *= 0.75f;
|
||||
}
|
||||
Main.spriteBatch.Draw(texture2D22, vector31 - Main.screenPosition + value29, new Microsoft.Xna.Framework.Rectangle?(rectangle8), alpha3, rotation24, new Vector2((float)(rectangle8.Width / 2), 0f), projectile.scale, SpriteEffects.None, 0f);
|
||||
num234 += num237;
|
||||
vector31 += value28 * num237;
|
||||
}
|
||||
}
|
||||
rectangle8 = new Rectangle(0, 104, texture2D22.Width, 50); //90 and 48
|
||||
Main.spriteBatch.Draw(texture2D22, value30 - Main.screenPosition + value29, new Microsoft.Xna.Framework.Rectangle?(rectangle8), alpha3, rotation24, texture2D22.Frame(1, 1, 0, 0).Top(), projectile.scale, SpriteEffects.None, 0f);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void CutTiles()
|
||||
{
|
||||
DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile;
|
||||
Vector2 unit = projectile.velocity;
|
||||
Utils.PlotTileLine(projectile.Center, projectile.Center + unit * projectile.localAI[1], (float)projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CutTiles));
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
if (projHitbox.Intersects(targetHitbox))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
float num8 = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + projectile.velocity, 16f * projectile.scale, ref num8))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Nightwither>(), 240);
|
||||
projectile.localAI[1] = 4f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.8 KiB |