Setup melee. Add Zweichender (#34)

* Setup melee. Add Zweichender

* Update base.yml

* Update base.yml
This commit is contained in:
Ed
2024-04-04 00:56:54 +03:00
committed by GitHub
parent 1566e14bfb
commit 3c2f198567
13 changed files with 132 additions and 0 deletions

View File

@@ -113,6 +113,11 @@ public sealed partial class MeleeWeaponComponent : Component
[ViewVariables(VVAccess.ReadWrite), DataField]
public bool SwingLeft;
/// <summary>
/// CrystallPunk Melee improvment. Allows each attack to take turns being either left or right
/// </summary>
[DataField]
public bool CPSwingBeverage = true;
// Sounds

View File

@@ -428,6 +428,11 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
var attackEv = new MeleeAttackEvent(weaponUid);
RaiseLocalEvent(user, ref attackEv);
//CrystallPun melee improvment
if (weapon.CPSwingBeverage)
weapon.SwingLeft = !weapon.SwingLeft;
//CrystallPun melee improvment end
weapon.Attacking = true;
return true;
}

View File

@@ -0,0 +1,57 @@
# Simple melee weapons
# Battle Staff
# Mace
# Stick
# Dagger
# Spear
# Light Hammer
# Throwing spear
# Hand axe
# Sickle
# Military melee weapons
# Halberd
# Battle pick
# Warhammer
# Battle axe
# Glaive
- type: entity
name: двуручный меч
abstract: true
parent: BaseItem
id: CPBaseTwoHandedSword
description: Мощное оружие, требующее огромной силы и умения для эффективного использования.
components:
- type: Sharp
- type: MeleeWeapon
attackRate: 0.75
damage:
types:
Slash: 10
Structural: 5
soundHit:
collection: MetalThud
- type: Wieldable
- type: IncreaseDamageOnWield
damage:
types:
Slash: 30
Structural: 5
- type: Item
size: Ginormous
# Long spear
# Long sword
# Whip
# Short sword
# Hammer
# Morgenstern
# Pika
# Rapier
# Axe
# Scimitar
# Trident
# Chain

View File

@@ -0,0 +1,17 @@
- type: entity
name: цвайхендер
parent: CPBaseTwoHandedSword
id: CPZweichender
components:
- type: MeleeWeapon
wideAnimationRotation: 225
- type: Sprite
sprite: CrystallPunk/Objects/Weapons/Melee/zweichhender.rsi
state: icon
- type: Clothing
sprite: CrystallPunk/Objects/Weapons/Melee/zweichhender.rsi
quickEquip: false
slots:
- back
#TODO двуручный хват требует перчаток чтобы не получать урона самому

View File

@@ -0,0 +1,14 @@
# Simple ranged weapon
# Crossbow
# Dart
# Short bow
# Slingshot
# Military ranged weapon
# Handheld crossbow
# Heavy Crossbow
# Longbow
# Blowpipe
# Net

Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 B

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

View File

@@ -0,0 +1,34 @@
{
"version": 1,
"license": "CC-BY-NC-SA-3.0",
"copyright": "Created by Hemo (Discord) for CrystallPunk",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
},
{
"name": "inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"directions": 4
},
{
"name": "wielded-inhand-left",
"directions": 4
},
{
"name": "wielded-inhand-right",
"directions": 4
},
{
"name": "equipped-BACKPACK",
"directions": 4
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B