* - add: Flash protection for wiz hardsuit helmet.

* - tweak: Cheaper wiz melee weapons.

* - add: Rework alt lightning.

* - fix: Timestop fixes.

* - add: Don't end round on midround wizard death.

* - tweak: Better shield.

* - fix: Some fixes.

* - fix: Fix wizard teleport pulling.

* - add: Improve arc.

* - add: Update knock.

* - add: Update knock desc.

* - add: Arcane Barrage.
This commit is contained in:
Aviu00
2024-06-22 12:55:50 +00:00
committed by GitHub
parent 5137493c4c
commit dccd8aab1a
41 changed files with 394 additions and 52 deletions

View File

@@ -1,4 +1,8 @@
namespace Content.Server._White.Wizard.Magic.TeslaProjectile;
[RegisterComponent]
public sealed partial class TeslaProjectileComponent : Component {}
public sealed partial class TeslaProjectileComponent : Component
{
[ViewVariables]
public EntityUid? Caster;
}

View File

@@ -16,6 +16,6 @@ public sealed class TeslaProjectileSystem : EntitySystem
private void OnStartCollide(Entity<TeslaProjectileComponent> ent, ref ProjectileHitEvent args)
{
_lightning.ShootRandomLightnings(ent, 2, 4, arcDepth:2);
_lightning.ShootRandomLightnings(ent, 3, 4, "WizardLightning", 2, false, ent.Comp.Caster);
}
}

View File

@@ -4,6 +4,7 @@ using Content.Server._White.Cult;
using Content.Server._White.IncorporealSystem;
using Content.Server._White.Wizard.Magic.Amaterasu;
using Content.Server._White.Wizard.Magic.Other;
using Content.Server._White.Wizard.Magic.TeslaProjectile;
using Content.Server._White.Wizard.Teleport;
using Content.Server.Abilities.Mime;
using Content.Server.Administration.Commands;
@@ -86,6 +87,7 @@ public sealed class WizardSpellsSystem : EntitySystem
{
base.Initialize();
SubscribeLocalEvent<ArcaneBarrageSpellEvent>(OnArcaneBarrage);
SubscribeLocalEvent<StopTimeSpellEvent>(OnTimeStop);
SubscribeLocalEvent<MindswapSpellEvent>(OnMindswapSpell);
SubscribeLocalEvent<TeleportSpellEvent>(OnTeleportSpell);
@@ -105,6 +107,29 @@ public sealed class WizardSpellsSystem : EntitySystem
SubscribeLocalEvent<MagicComponent, BeforeCastSpellEvent>(OnBeforeCastSpell);
}
#region Arcane Barrage
private void OnArcaneBarrage(ArcaneBarrageSpellEvent msg)
{
if (!CanCast(msg))
return;
var uid = msg.Performer;
var entity = Spawn(msg.Prototype, Transform(uid).Coordinates);
if (!_handsSystem.TryPickupAnyHand(uid, entity))
{
_popupSystem.PopupEntity(Loc.GetString("arcane-barrage-no-empty-hand"), uid, uid);
QueueDel(entity);
_actions.SetCooldown(msg.Action, TimeSpan.FromSeconds(1));
return;
}
msg.Handled = true;
}
#endregion
#region Timestop
private void OnTimeStop(StopTimeSpellEvent msg)
@@ -803,6 +828,7 @@ public sealed class WizardSpellsSystem : EntitySystem
userVelocity = physics.LinearVelocity;
var ent = Spawn(msg.Prototype, spawnCoords);
EnsureComp<TeslaProjectileComponent>(ent).Caster = msg.Performer;
var direction = msg.Target.ToMapPos(EntityManager, _transformSystem) -
spawnCoords.ToMapPos(EntityManager, _transformSystem);
_gunSystem.ShootProjectile(ent, direction, userVelocity, msg.Performer, msg.Performer);