Magic 8 (#376)
* - 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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user