V8 Basis
This commit is contained in:
1 parent
16389cd9f1
commit
11171d6204
6 files changed
+107
-1
No files matched your search
@@ -935,6 +935,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool seraphTracers = false;
|
||||
public bool frostFlare = false;
|
||||
public bool evolution = false;
|
||||
public bool v8Engine = false;
|
||||
public bool nanotech = false;
|
||||
public bool deadshotBrooch = false;
|
||||
public bool shadowMinions = false;
|
||||
@@ -2371,6 +2372,7 @@ namespace CalamityMod.CalPlayer
|
||||
amalgam = false;
|
||||
frostFlare = false;
|
||||
evolution = false;
|
||||
v8Engine = false;
|
||||
nanotech = false;
|
||||
deadshotBrooch = false;
|
||||
tesla = false;
|
||||
@@ -3768,6 +3770,14 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (CalamityKeybinds.DashHotkey.JustPressed)
|
||||
{
|
||||
if (godSlayer && !Player.pulley && Player.grappling[0] == -1 && !Player.tongued && !Player.mount.Active && !Player.HasCooldown(GodSlayerDash.ID) && Player.dashDelay == 0)
|
||||
{
|
||||
godSlayerDashHotKeyPressed = true;
|
||||
}
|
||||
}
|
||||
|
||||
//Right click dash on Speed Blaster
|
||||
if (sBlasterDashActivated == true)
|
||||
{
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// Handle first-frame effects.
|
||||
else if (HasCustomDash && !Player.mount.Active)
|
||||
else if (HasCustomDash && (!Player.mount.Active || DashID == V8EngineDash.ID))
|
||||
{
|
||||
UsedDash.dashTime = 0;
|
||||
if (DoADash(UsedDash.CalculateDashSpeed(Player)))
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
public class V8EngineDash : PlayerDashEffect
|
||||
{
|
||||
public static new string ID { get; private set; }
|
||||
|
||||
public override DashCollisionType CollisionType => DashCollisionType.ShieldSlam;
|
||||
|
||||
public override bool IsOmnidirectional => false;
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
ID = DashID;
|
||||
}
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => 13f;
|
||||
|
||||
public override void DashStartupEffects(Player player)
|
||||
{
|
||||
player.velocity *= 0.9f;
|
||||
}
|
||||
|
||||
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
|
||||
{
|
||||
dashSpeed = 10.5f;
|
||||
|
||||
|
||||
|
||||
// Spawn fire dust around the player's body.
|
||||
if (DashTimeAdjustedForStartup > 14)
|
||||
return;
|
||||
for (int d = 0; d < 3; d++)
|
||||
{
|
||||
Dust holyFireDashDust = Dust.NewDustDirect(player.position + Vector2.UnitY * 4f, player.width, player.height - 8, Main.rand.NextBool() ? 296 : 158, 0f, 0f, 0, default, 1.2f);
|
||||
holyFireDashDust.velocity = -player.velocity * Main.rand.NextFloat(0.1f, 0.75f);
|
||||
holyFireDashDust.scale *= Main.rand.NextFloat(2f, 2.4f);
|
||||
holyFireDashDust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player);
|
||||
holyFireDashDust.noGravity = true;
|
||||
if (Main.rand.NextBool())
|
||||
holyFireDashDust.fadeIn = 0.1f;
|
||||
}
|
||||
Vector2 dustPosition = player.Center + new Vector2(Main.rand.NextFloat(-6f, 6f), Main.rand.NextFloat(-15f, 15f)) - (player.velocity * 1.7f);
|
||||
Dust dust = Dust.NewDustPerfect(dustPosition, DustID.FireworkFountain_Yellow, -player.velocity * Main.rand.NextFloat(0.15f, 0.4f), 0, default, 0.5f);
|
||||
dust.noGravity = false;
|
||||
dust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Rarities;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class V8Engine : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 44;
|
||||
Item.height = 42;
|
||||
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
|
||||
Item.rare = ModContent.RarityType<Turquoise>();
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.v8Engine = true;
|
||||
modPlayer.DashID = V8EngineDash.ID;
|
||||
player.dashType = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
@@ -2205,3 +2205,8 @@ XyksBlessingOrange: {
|
||||
[c/E1B65F:Prove that it was never a waste.']
|
||||
'''
|
||||
}
|
||||
|
||||
V8Engine: {
|
||||
DisplayName: V8 Engine
|
||||
Tooltip: ""
|
||||
}
|
||||
Reference in new issue
Block a user