Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadowkin Nerf.... #55

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 58 additions & 58 deletions Content.Server/Abilities/Psionics/Abilities/DarkSwapSystem.cs
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
using Content.Shared.Abilities.Psionics;
using Content.Shared.Actions.Events;
using Content.Shared.Shadowkin;
using Content.Shared.Physics;
using Content.Shared.Popups;
using Content.Shared.Maps;
using Robust.Server.GameObjects;

namespace Content.Server.Abilities.Psionics
{
public sealed class DarkSwapSystem : EntitySystem
{
[Dependency] private readonly SharedPsionicAbilitiesSystem _psionics = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly PhysicsSystem _physics = default!;

public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<DarkSwapActionEvent>(OnPowerUsed);
}

private void OnPowerUsed(DarkSwapActionEvent args)
{
if (TryComp<EtherealComponent>(args.Performer, out var ethereal))
{
var tileref = Transform(args.Performer).Coordinates.GetTileRef();
if (tileref != null
&& _physics.GetEntitiesIntersectingBody(args.Performer, (int) CollisionGroup.Impassable).Count > 0)
{
_popup.PopupEntity(Loc.GetString("revenant-in-solid"), args.Performer, args.Performer);
return;
}

if (_psionics.OnAttemptPowerUse(args.Performer, "DarkSwap"))
{
SpawnAtPosition("ShadowkinShadow", Transform(args.Performer).Coordinates);
SpawnAtPosition("EffectFlashShadowkinDarkSwapOff", Transform(args.Performer).Coordinates);
RemComp(args.Performer, ethereal);
args.Handled = true;
}
}
else if (_psionics.OnAttemptPowerUse(args.Performer, "DarkSwap", args.ManaCost))
{
var newethereal = EnsureComp<EtherealComponent>(args.Performer);
newethereal.Darken = true;

SpawnAtPosition("ShadowkinShadow", Transform(args.Performer).Coordinates);
SpawnAtPosition("EffectFlashShadowkinDarkSwapOn", Transform(args.Performer).Coordinates);

args.Handled = true;
}

if (args.Handled)
_psionics.LogPowerUsed(args.Performer, "DarkSwap");
}
}
}
# using Content.Shared.Abilities.Psionics;
# using Content.Shared.Actions.Events;
# using Content.Shared.Shadowkin;
# using Content.Shared.Physics;
# using Content.Shared.Popups;
# using Content.Shared.Maps;
# using Robust.Server.GameObjects;

# namespace Content.Server.Abilities.Psionics
# {
# public sealed class DarkSwapSystem : EntitySystem
# {
# [Dependency] private readonly SharedPsionicAbilitiesSystem _psionics = default!;
# [Dependency] private readonly SharedPopupSystem _popup = default!;
# [Dependency] private readonly PhysicsSystem _physics = default!;

# public override void Initialize()
# {
# base.Initialize();
# SubscribeLocalEvent<DarkSwapActionEvent>(OnPowerUsed);
# }
#
# private void OnPowerUsed(DarkSwapActionEvent args)
# {
# if (TryComp<EtherealComponent>(args.Performer, out var ethereal))
# {
# var tileref = Transform(args.Performer).Coordinates.GetTileRef();
# if (tileref != null
# && _physics.GetEntitiesIntersectingBody(args.Performer, (int) CollisionGroup.Impassable).Count > 0)
# {
# _popup.PopupEntity(Loc.GetString("revenant-in-solid"), args.Performer, args.Performer);
# return;
# }

# if (_psionics.OnAttemptPowerUse(args.Performer, "DarkSwap"))
# {
# SpawnAtPosition("ShadowkinShadow", Transform(args.Performer).Coordinates);
# SpawnAtPosition("EffectFlashShadowkinDarkSwapOff", Transform(args.Performer).Coordinates);
# RemComp(args.Performer, ethereal);
# args.Handled = true;
# }
# }
# else if (_psionics.OnAttemptPowerUse(args.Performer, "DarkSwap", args.ManaCost))
# {
# var newethereal = EnsureComp<EtherealComponent>(args.Performer);
# newethereal.Darken = true;

# SpawnAtPosition("ShadowkinShadow", Transform(args.Performer).Coordinates);
# SpawnAtPosition("EffectFlashShadowkinDarkSwapOn", Transform(args.Performer).Coordinates);

# args.Handled = true;
# }

# if (args.Handled)
# _psionics.LogPowerUsed(args.Performer, "DarkSwap");
# }
# }
# }


14 changes: 7 additions & 7 deletions Resources/Prototypes/Damage/modifier_sets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,16 +361,16 @@
- type: damageModifierSet
id: Shadowkin
coefficients:
Blunt: 0.95
Slash: 1.2
Piercing: 1.1
Blunt: 1.2
Slash: 1.3
Piercing: 1.2
Asphyxiation: 0
Cold: 0.75
Cold: 0.8
Heat: 1.2
Cellular: 0.25
Cellular: 0.50
Bloodloss: 1.35
Shock: 1.25
Radiation: 1.3
Shock: 1.35
Radiation: 1.45

- type: damageModifierSet
id: DermalArmor
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Species/shadowkin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- type: species
id: Shadowkin
name: species-name-shadowkin
roundStart: false
roundStart: true
prototype: MobShadowkin
sprites: MobShadowkinSprites
defaultSkinTone: "#FFFFFF"
Expand Down
Loading