Adds Double bladed Esword (#17227)

* Changed Energy Sword system to allow Wieldable eswords

Needed to add conditions to allow the wielding system to handle the esword if the component existed in the entity. The normal eswords work just fine still.

* Adds sprites for double bladed esword

* added double bladed esword to yml

* Add double bladed esword to uplink catalog

* fixed sprites on right handed wielding

* decresed speed a little and added a wielding time

* Reduced damage

* Damage change

* Balence change

* edited attack speed and heavy windup

* fixed readability issue and removed unwanted brackets

* reflectProp to .75

Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>

* wieldTime to 0

Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>

* litDisarmMalus to .7

Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>

* changed heat and slash damage to 9 and structural damage to 20

* changed uplink desc

---------

Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
This commit is contained in:
FacePluslll
2023-06-18 14:35:23 -05:00
committed by GitHub
parent dd7032a860
commit 422a84e029
14 changed files with 165 additions and 0 deletions

View File

@@ -10,6 +10,8 @@ using Content.Shared.Toggleable;
using Content.Shared.Tools.Components;
using Content.Shared.Weapons.Melee;
using Content.Shared.Weapons.Melee.Events;
using Content.Shared.Wieldable;
using Content.Shared.Wieldable.Components;
using Robust.Shared.Player;
using Robust.Shared.Random;
@@ -34,6 +36,9 @@ public sealed class EnergySwordSystem : EntitySystem
SubscribeLocalEvent<EnergySwordComponent, IsHotEvent>(OnIsHotEvent);
SubscribeLocalEvent<EnergySwordComponent, EnergySwordDeactivatedEvent>(TurnOff);
SubscribeLocalEvent<EnergySwordComponent, EnergySwordActivatedEvent>(TurnOn);
SubscribeLocalEvent<EnergySwordComponent, ItemUnwieldedEvent>(TurnOffonUnwielded);
SubscribeLocalEvent<EnergySwordComponent, ItemWieldedEvent>(TurnOnonWielded);
}
private void OnMapInit(EntityUid uid, EnergySwordComponent comp, MapInitEvent args)
@@ -58,6 +63,9 @@ public sealed class EnergySwordSystem : EntitySystem
args.Handled = true;
if (TryComp<WieldableComponent>(uid, out var wieldableComp))
return;
if (comp.Activated)
{
var ev = new EnergySwordDeactivatedEvent();
@@ -72,6 +80,20 @@ public sealed class EnergySwordSystem : EntitySystem
UpdateAppearance(uid, comp);
}
private void TurnOffonUnwielded(EntityUid uid, EnergySwordComponent comp, ItemUnwieldedEvent args)
{
var ev = new EnergySwordDeactivatedEvent();
RaiseLocalEvent(uid, ref ev);
UpdateAppearance(uid, comp);
}
private void TurnOnonWielded(EntityUid uid, EnergySwordComponent comp, ref ItemWieldedEvent args)
{
var ev = new EnergySwordActivatedEvent();
RaiseLocalEvent(uid, ref ev);
UpdateAppearance(uid, comp);
}
private void TurnOff(EntityUid uid, EnergySwordComponent comp, ref EnergySwordDeactivatedEvent args)
{
if (TryComp(uid, out ItemComponent? item))

View File

@@ -14,6 +14,9 @@ uplink-rifle-mosin-desc = A bolt action service rifle that has seen many wars. N
uplink-esword-name = Energy Sword
uplink-esword-desc = A very dangerous energy sword that can reflect shots. Can be stored in pockets when turned off. Makes a lot of noise when used or turned on.
uplink-esword-double-name = Double Bladed Energy Sword
uplink-esword-double-desc = A much more expensive counter part to the normal energy sword: with a much higher reflection chance, larger attack angle, higher structural damage, and faster swing, all at the cost of lower heat and slash damage. Makes a lot of noise when used or turned on.
uplink-edagger-name = Energy Dagger
uplink-edagger-desc = A small energy blade conveniently disguised in the form of a pen.

View File

@@ -85,6 +85,17 @@
categories:
- UplinkWeapons
- type: listing
id: UplinkEswordDouble
name: uplink-esword-double-name
description: uplink-esword-double-desc
icon: { sprite: /Textures/Objects/Weapons/Melee/e_sword_double.rsi, state: icon }
productEntity: EnergySwordDouble
cost:
Telecrystal: 16
categories:
- UplinkWeapons
# Explosives
- type: listing

View File

@@ -161,3 +161,46 @@
- type: Item
size: 5
sprite: Objects/Weapons/Melee/e_cutlass.rsi
- type: entity
name: Double Bladed Energy Sword
parent: EnergySword
id: EnergySwordDouble
description: Syndicate Command Interns thought that having one blade on the energy sword was not enough. This can be stored in pockets.
components:
- type: Wieldable
wieldTime: 0
- type: EnergySword
litDamageBonus:
types:
Slash: 9
Heat: 9
Structural: 20
Blunt: -4.5
litDisarmMalus: 0.7
- type: MeleeWeapon
attackRate: 1.6
angle: 100
heavyWindupModifier: .9
heavyDamageModifier: 1.5
soundHit:
path: /Audio/Weapons/eblade1.ogg
damage:
types:
Blunt: 4.5
- type: Sprite
sprite: Objects/Weapons/Melee/e_sword_double.rsi
layers:
- state: e_sword_double
- state: e_sword_double_blade
color: "#FFFFFF"
visible: false
shader: unshaded
map: [ "blade" ]
- type: Item
size: 10
sprite: Objects/Weapons/Melee/e_sword_double.rsi
- type: Reflect
enabled: true
reflectProb: .75
spread: 75

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

View File

@@ -0,0 +1,86 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from tgstation at https://github.com/tgstation/tgstation",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
},
{
"name": "e_sword_double"
},
{
"name": "inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"directions": 4
},
{
"name": "wielded-inhand-left",
"directions": 4
},
{
"name": "wielded-inhand-right",
"directions": 4
},
{
"name": "e_sword_double_blade",
"delays": [
[
0.1,
0.1
]
]
},
{
"name": "inhand-left-blade",
"directions": 4,
"delays": [
[
0.1,
0.1
],
[
0.1,
0.1
],
[
0.1,
0.1
],
[
0.1,
0.1
]
]
},
{
"name": "inhand-right-blade",
"directions": 4,
"delays": [
[
0.1,
0.1
],
[
0.1,
0.1
],
[
0.1,
0.1
],
[
0.1,
0.1
]
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B