Dance of Light rework started
This commit is contained in:
1 parent
d855e73703
commit
18758d8a2b
11 files changed
+87
-219
No files matched your search
@@ -846,6 +846,8 @@ namespace CalamityMod.Items
|
||||
tt2.overrideColor = new Color(Main.DiscoR, 100, 255);
|
||||
if (item.type == ModContent.ItemType<BlushieStaff>())
|
||||
tt2.overrideColor = new Color(0, 0, 255);
|
||||
if (item.type == ModContent.ItemType<TheDanceofLight>())
|
||||
tt2.overrideColor = new Color(1f, 0.5f + 0.35f * Main.DiscoG / 255f, 1f);
|
||||
if (item.type == ModContent.ItemType<NanoblackReaperMelee>() || item.type == ModContent.ItemType<NanoblackReaperRogue>())
|
||||
tt2.overrideColor = new Color(0.34f, 0.34f + 0.66f * Main.DiscoG / 255f, 0.34f + 0.5f * Main.DiscoG / 255f);
|
||||
if (item.type == ModContent.ItemType<ProfanedSoulCrystal>())
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class Judgement : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("The Dance of Light");
|
||||
Tooltip.SetDefault("Casts a swarm of white flames from the sky");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 700;
|
||||
item.magic = true;
|
||||
item.mana = 9;
|
||||
item.width = 28;
|
||||
item.height = 30;
|
||||
item.useTime = 10;
|
||||
item.useAnimation = 10;
|
||||
item.useStyle = 5;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 4f;
|
||||
item.value = Item.buyPrice(5, 0, 0, 0);
|
||||
item.rare = 10;
|
||||
item.UseSound = SoundID.Item88;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<WhiteFlame>();
|
||||
item.shootSpeed = 30f;
|
||||
item.Calamity().customRarity = CalamityRarity.Developer;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.LunarFlareBook);
|
||||
recipe.AddIngredient(ModContent.ItemType<WrathoftheAncients>());
|
||||
recipe.AddIngredient(ModContent.ItemType<ShadowspecBar>(), 5);
|
||||
recipe.AddTile(ModContent.TileType<DraedonsForge>());
|
||||
recipe.SetResult(this);
|
||||
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)
|
||||
{
|
||||
float num72 = item.shootSpeed;
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
|
||||
if (player.gravDir == -1f)
|
||||
{
|
||||
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
|
||||
}
|
||||
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
|
||||
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
|
||||
{
|
||||
num78 = (float)player.direction;
|
||||
num79 = 0f;
|
||||
num80 = num72;
|
||||
}
|
||||
else
|
||||
{
|
||||
num80 = num72 / num80;
|
||||
}
|
||||
|
||||
int num107 = 3;
|
||||
for (int num108 = 0; num108 < num107; num108++)
|
||||
{
|
||||
vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
|
||||
vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
|
||||
vector2.Y -= (float)(100 * num108);
|
||||
num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
|
||||
if (num79 < 0f)
|
||||
{
|
||||
num79 *= -1f;
|
||||
}
|
||||
if (num79 < 20f)
|
||||
{
|
||||
num79 = 20f;
|
||||
}
|
||||
num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
|
||||
num80 = num72 / num80;
|
||||
num78 *= num80;
|
||||
num79 *= num80;
|
||||
float speedX4 = num78 + (float)Main.rand.Next(-20, 21) * 0.02f;
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-20, 21) * 0.02f;
|
||||
Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(15));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 570 B |
@@ -0,0 +1,83 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class TheDanceofLight : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("The Dance of Light");
|
||||
Tooltip.SetDefault("'Show them the wrath of a Lightbearer'");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 40;
|
||||
item.height = 42;
|
||||
item.damage = 500;
|
||||
item.knockBack = 4f;
|
||||
item.magic = true;
|
||||
item.mana = 4;
|
||||
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.useTime = 4;
|
||||
item.useAnimation = 4;
|
||||
item.UseSound = SoundID.Item105;
|
||||
item.autoReuse = true;
|
||||
item.noMelee = true;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<ElementBallShiv>();
|
||||
item.shootSpeed = 14f;
|
||||
|
||||
item.value = Item.buyPrice(platinum: 5);
|
||||
item.rare = 10;
|
||||
item.Calamity().customRarity = CalamityRarity.ItemSpecific;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return Vector2.Zero;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
float intendedSpeed = (float)Math.Sqrt(speedX * speedX + speedY * speedY);
|
||||
Vector2 target = Main.MouseWorld;
|
||||
float minOffsetX = -40f;
|
||||
float maxOffsetX = 40f;
|
||||
if (target.X > player.Center.X)
|
||||
minOffsetX = -120f;
|
||||
else
|
||||
maxOffsetX = 120f;
|
||||
|
||||
int numProjectiles = 3;
|
||||
for (int i = 0; i < numProjectiles; ++i)
|
||||
{
|
||||
float speed = Main.rand.NextFloat(0.94f, 1.02f) * intendedSpeed;
|
||||
Vector2 deviation = new Vector2(Main.rand.NextFloat(minOffsetX, maxOffsetX), Main.rand.NextFloat(-1400f, -1200f));
|
||||
Vector2 startPos = target + deviation;
|
||||
Vector2 vel = Vector2.Normalize(-deviation) * speed;
|
||||
Projectile.NewProjectileDirect(startPos, vel, type, damage, knockBack, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.LunarFlareBook);
|
||||
recipe.AddIngredient(ModContent.ItemType<WrathoftheAncients>());
|
||||
recipe.AddIngredient(ModContent.ItemType<ShadowspecBar>(), 5);
|
||||
recipe.AddTile(ModContent.TileType<DraedonsForge>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 876 B |
@@ -534,7 +534,7 @@ namespace CalamityMod
|
||||
BossDifficulty.TryGetValue("SupremeCalamitas", out float order);
|
||||
int type = NPCType<SupremeCalamitas>();
|
||||
int summon = ItemType<EyeofExtinction>();
|
||||
List<int> loot = new List<int>() { ItemType<CalamitousEssence>(), ItemType<Animus>(), ItemType<Azathoth>(), ItemType<Contagion>(), ItemType<CrystylCrusher>(), ItemType<DraconicDestruction>(), ItemType<Earth>(), ItemType<Fabstaff>(), ItemType<RoyalKnivesMelee>(), ItemType<RoyalKnives>(), ItemType<NanoblackReaperMelee>(), ItemType<NanoblackReaperRogue>(), ItemType<RedSun>(), ItemType<ScarletDevil>(), ItemType<SomaPrime>(), ItemType<BlushieStaff>(), ItemType<Svantechnical>(), ItemType<Judgement>(), ItemType<TriactisTruePaladinianMageHammerofMightMelee>(), ItemType<TriactisTruePaladinianMageHammerofMight>(), ItemType<Megafleet>(), ItemType<Endogenesis>(), ItemType<Vehemenc>(), ItemType<OmegaHealingPotion>() };
|
||||
List<int> loot = new List<int>() { ItemType<CalamitousEssence>(), ItemType<Animus>(), ItemType<Azathoth>(), ItemType<Contagion>(), ItemType<CrystylCrusher>(), ItemType<DraconicDestruction>(), ItemType<Earth>(), ItemType<Fabstaff>(), ItemType<RoyalKnivesMelee>(), ItemType<RoyalKnives>(), ItemType<NanoblackReaperMelee>(), ItemType<NanoblackReaperRogue>(), ItemType<RedSun>(), ItemType<ScarletDevil>(), ItemType<SomaPrime>(), ItemType<BlushieStaff>(), ItemType<Svantechnical>(), ItemType<TheDanceofLight>(), ItemType<TriactisTruePaladinianMageHammerofMightMelee>(), ItemType<TriactisTruePaladinianMageHammerofMight>(), ItemType<Megafleet>(), ItemType<Endogenesis>(), ItemType<Vehemenc>(), ItemType<OmegaHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<KnowledgeCalamitas>(), ItemType<BrimstoneJewel>(), ItemType<Levi>() };
|
||||
string instructions = $"Use an [i:{summon}]";
|
||||
string despawn = CalamityUtils.ColorMessage("Please don't waste my time.", new Color(0xFF, 0xA5, 0x00));
|
||||
|
||||
@@ -2165,7 +2165,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
ModContent.ItemType<SomaPrime>(), ModContent.ItemType<SomaPrime>(),
|
||||
ModContent.ItemType<BlushieStaff>(), ModContent.ItemType<BlushieStaff>(), // Staff of Blushie
|
||||
ModContent.ItemType<Svantechnical>(), ModContent.ItemType<Svantechnical>(),
|
||||
ModContent.ItemType<Judgement>(), ModContent.ItemType<Judgement>(), // The Dance of Light
|
||||
ModContent.ItemType<TheDanceofLight>(), ModContent.ItemType<TheDanceofLight>(),
|
||||
ModContent.ItemType<TriactisTruePaladinianMageHammerofMightMelee>(), ModContent.ItemType<TriactisTruePaladinianMageHammerofMight>(),
|
||||
ModContent.ItemType<Megafleet>(), ModContent.ItemType<Megafleet>(), // Voidragon
|
||||
ModContent.ItemType<Endogenesis>(), ModContent.ItemType<Endogenesis>(),
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class WhiteFlame : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Flame");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 12;
|
||||
projectile.height = 12;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.timeLeft = 120;
|
||||
projectile.magic = true;
|
||||
projectile.extraUpdates = 3;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (projectile.timeLeft % 6f == 0f)
|
||||
{
|
||||
for (int num457 = 0; num457 < Main.rand.Next(3,6); num457++)
|
||||
{
|
||||
int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 91, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num458].noGravity = true;
|
||||
Main.dust[num458].velocity *= 0.5f;
|
||||
Main.dust[num458].velocity += projectile.velocity * 0.1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 122);
|
||||
int num251 = 4;
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
for (int num252 = 0; num252 < num251; num252++)
|
||||
{
|
||||
Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
while (value15.X == 0f && value15.Y == 0f)
|
||||
{
|
||||
value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
|
||||
}
|
||||
value15.Normalize();
|
||||
value15 *= (float)Main.rand.Next(70, 101) * 0.1f;
|
||||
Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, ModContent.ProjectileType<WhiteFlame2>(), projectile.damage, 0f, projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 360);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 139 B |
@@ -1,51 +0,0 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class WhiteFlame2 : ModProjectile
|
||||
{
|
||||
float homeTimer = 100;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Flame");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 6;
|
||||
projectile.height = 6;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.tileCollide = false;
|
||||
projectile.penetrate = 3;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 1;
|
||||
projectile.timeLeft = 120;
|
||||
projectile.magic = true;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (projectile.timeLeft % 2f == 0f)
|
||||
{
|
||||
for (int num457 = 0; num457 < Main.rand.Next(3,6); num457++)
|
||||
{
|
||||
int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 91, 0f, 0f, 100, default, 0.5f);
|
||||
Main.dust[num458].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
homeTimer += 5f;
|
||||
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, homeTimer, 25f, 20f);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 360);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 136 B |
Reference in new issue
Block a user