Spellcaster slowdown, mole nerf, new shoulder slot, healing staff (#538)

* healing staff sprite

* new back slot and move all big things to whis slot

* replace ring to staff

* caster sowdown! Mole rebalance

* loadouts fix

* fix weapon rotation

* Update spawners.yml
This commit is contained in:
Ed
2024-11-05 19:05:40 +03:00
committed by GitHub
parent c3d4303270
commit b5df675187
48 changed files with 230 additions and 81 deletions

View File

@@ -2,6 +2,7 @@ using Content.Server.Chat.Systems;
using Content.Shared._CP14.MagicSpell;
using Content.Shared._CP14.MagicSpell.Components;
using Content.Shared._CP14.MagicSpell.Events;
using Content.Shared.Movement.Systems;
using Robust.Server.GameObjects;
namespace Content.Server._CP14.MagicSpell;
@@ -10,6 +11,7 @@ public sealed partial class CP14MagicSystem : CP14SharedMagicSystem
{
[Dependency] private readonly ChatSystem _chat = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly MovementSpeedModifierSystem _movement = default!;
public override void Initialize()
{
@@ -17,6 +19,41 @@ public sealed partial class CP14MagicSystem : CP14SharedMagicSystem
SubscribeLocalEvent<CP14MagicEffectCastingVisualComponent, CP14StartCastMagicEffectEvent>(OnSpawnMagicVisualEffect);
SubscribeLocalEvent<CP14MagicEffectCastingVisualComponent, CP14EndCastMagicEffectEvent>(OnDespawnMagicVisualEffect);
SubscribeLocalEvent<CP14MagicEffectCastSlowdownComponent, CP14StartCastMagicEffectEvent>(OnSlowdownCaster);
SubscribeLocalEvent<CP14MagicEffectCastSlowdownComponent, CP14EndCastMagicEffectEvent>(OnUnslowdownCaster);
SubscribeLocalEvent<CP14MagicCasterSlowdownComponent, RefreshMovementSpeedModifiersEvent>(OnCasterRefreshMovespeed);
}
private void OnSlowdownCaster(Entity<CP14MagicEffectCastSlowdownComponent> ent, ref CP14StartCastMagicEffectEvent args)
{
if (!TryComp<CP14MagicCasterSlowdownComponent>(args.Performer, out var caster))
return;
caster.SpeedModifiers.Add(ent.Comp.SpeedMultiplier);
_movement.RefreshMovementSpeedModifiers(args.Performer);
}
private void OnUnslowdownCaster(Entity<CP14MagicEffectCastSlowdownComponent> ent, ref CP14EndCastMagicEffectEvent args)
{
if (!TryComp<CP14MagicCasterSlowdownComponent>(args.Performer, out var caster))
return;
if (caster.SpeedModifiers.Contains(ent.Comp.SpeedMultiplier))
caster.SpeedModifiers.Remove(ent.Comp.SpeedMultiplier);
_movement.RefreshMovementSpeedModifiers(args.Performer);
}
private void OnCasterRefreshMovespeed(Entity<CP14MagicCasterSlowdownComponent> ent, ref RefreshMovementSpeedModifiersEvent args)
{
var result = 1f;
foreach (var modifier in ent.Comp.SpeedModifiers)
{
result += modifier;
}
args.ModifySpeed(result);
}
private void OnSpellSpoken(Entity<CP14MagicEffectVerbalAspectComponent> ent, ref CP14VerbalAspectSpeechEvent args)

View File

@@ -26,11 +26,11 @@ public enum SlotFlags
LEGS = 1 << 13,
FEET = 1 << 14,
SUITSTORAGE = 1 << 15,
RING = 1 << 16,
PANTS = 1 << 17,
SHIRT = 1 << 18,
CLOAK = 1 << 19,
KEYS = 1 << 20,
RING = 1 << 16, //CP14
PANTS = 1 << 17, //CP14
SHIRT = 1 << 18, //CP14
CLOAK = 1 << 19, //CP14
KEYS = 1 << 20, //CP14
All = ~NONE,
WITHOUT_POCKET = All & ~POCKET

View File

@@ -137,7 +137,7 @@ public partial class CP14SharedMagicSystem : EntitySystem
private void OnDelayedEntityWorldTargetDoAfter(Entity<CP14MagicEffectComponent> ent,
ref CP14DelayedEntityWorldTargetActionDoAfterEvent args)
{
var endEv = new CP14EndCastMagicEffectEvent();
var endEv = new CP14EndCastMagicEffectEvent{Performer = args.User};
RaiseLocalEvent(ent, ref endEv);
if (args.Cancelled || !_net.IsServer)
@@ -160,7 +160,7 @@ public partial class CP14SharedMagicSystem : EntitySystem
private void OnDelayedInstantActionDoAfter(Entity<CP14MagicEffectComponent> ent, ref CP14DelayedInstantActionDoAfterEvent args)
{
var endEv = new CP14EndCastMagicEffectEvent();
var endEv = new CP14EndCastMagicEffectEvent{Performer = args.User};
RaiseLocalEvent(ent, ref endEv);
if (args.Cancelled || !_net.IsServer)

View File

@@ -0,0 +1,11 @@
namespace Content.Shared._CP14.MagicSpell.Components;
/// <summary>
/// imposes debuffs on excessive use of magic
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
public sealed partial class CP14MagicCasterSlowdownComponent : Component
{
[DataField]
public List<float> SpeedModifiers = new();
}

View File

@@ -0,0 +1,14 @@
using Content.Shared._CP14.MagicSpell.Spells;
using Content.Shared.FixedPoint;
namespace Content.Shared._CP14.MagicSpell.Components;
/// <summary>
/// Slows the caster while using this spell
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
public sealed partial class CP14MagicEffectCastSlowdownComponent : Component
{
[DataField]
public float SpeedMultiplier = 1f;
}

View File

@@ -36,6 +36,7 @@ public sealed class CP14StartCastMagicEffectEvent : EntityEventArgs
[ByRefEvent]
public sealed class CP14EndCastMagicEffectEvent : EntityEventArgs
{
public EntityUid Performer { get; init; }
}

View File

@@ -1,7 +1,7 @@
namespace Content.Shared._CP14.MagicSpellStorage;
/// <summary>
/// Denotes that this item's spells can be accessed while wearing it in your body
/// Denotes that this item's spells can be accessed while wearing it on your body
/// </summary>
[RegisterComponent, Access(typeof(CP14SpellStorageSystem))]
public sealed partial class CP14SpellStorageAccessWearingComponent : Component

View File

@@ -3,6 +3,8 @@
name: Cure wounds
description: You touch the creature, healing its body from physical damage
components:
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -0.5
- type: CP14MagicEffect
manaCost: 20
telegraphyEffects:
@@ -34,7 +36,6 @@
- type: CP14MagicEffectVerbalAspect
startSpeech: "Et curabuntur..."
endSpeech: "vulnera tua"
- type: CP14MagicEffectSomaticAspect
- type: CP14MagicEffectCastingVisual
proto: CP14RuneCureWounds
- type: EntityWorldTargetAction
@@ -42,6 +43,7 @@
components:
- MobState
useDelay: 10
range: 7
itemIconStyle: BigAction
interactOnMiss: false
sound: !type:SoundPathSpecifier
@@ -50,8 +52,9 @@
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: cure_wounds
event: !type:CP14DelayedEntityWorldTargetActionEvent
delay: 2
delay: 3
breakOnMove: false
- type: entity
id: CP14RuneCureWounds
parent: CP14BaseMagicRune

View File

@@ -3,6 +3,8 @@
name: Earth wall
description: Raises a solid wall of earth from the bowels.
components:
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -0.9
- type: CP14MagicEffect
manaCost: 15
telegraphyEffects:

View File

@@ -3,6 +3,8 @@
name: Fireball
description: An effective method of destruction - an explosive fireball
components:
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -0.7
- type: CP14MagicEffect
manaCost: 20
effects:

View File

@@ -3,6 +3,8 @@
name: Ice Shards
description: Fast ice needles, for rapid shooting of targets.
components:
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -0.25
- type: CP14MagicEffect
manaCost: 5
effects:

View File

@@ -3,6 +3,8 @@
name: Shadow step
description: A step through the gash of reality that allows you to cover a small of distance quickly
components:
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -0.4
- type: CP14MagicEffect
manaCost: 20
telegraphyEffects:

View File

@@ -102,24 +102,6 @@
spells:
- CP14ActionSpellFireball
- type: entity
id: CP14ClothingRingCureWounds
parent: CP14ClothingRingBase
name: cure wounds conductive ring
description: A standard mana-conductive ring that allows the user to heal physical injuries.
suffix: Cure Wounds
components:
- type: Sprite
layers:
- state: brass_ring
- state: emerald_stone_small
- type: CP14SpellStorageRequireAttune
- type: CP14MagicAttuningItem
- type: CP14SpellStorageAccessWearing
- type: CP14SpellStorage
spells:
- CP14ActionSpellCureWounds
- type: entity
id: CP14ClothingRingShadowStep
parent: CP14ClothingRingBase

View File

@@ -74,7 +74,7 @@
- id: CP14ClothingRingIceShards
- id: CP14ClothingRingFlameCreation
- id: CP14ClothingRingFireball
- id: CP14ClothingRingCureWounds
- id: CP14MagicHealingStaff
- id: CP14ClothingRingShadowStep
- id: CP14ClothingRingShadowGrab
- id: CP14ClothingRingEarthWall

View File

@@ -12,9 +12,9 @@
NavSmash: !type:Bool
true
VisionRadius: !type:Single
10
16
AggroVisionRadius: !type:Single
8
12
- type: NpcFactionMember
factions:
- CP14Monster
@@ -47,10 +47,10 @@
- type: MobThresholds
thresholds:
0: Alive
80: Dead
60: Dead
- type: SlowOnDamage
speedModifierThresholds:
70: 0.8
40: 0.8
- type: Stamina
critThreshold: 200
- type: CombatMode
@@ -59,9 +59,8 @@
animation: WeaponArcBite
damage:
types:
Slash: 2
Blunt: 4
Piercing: 4
Slash: 3
Piercing: 3
Structural: 3
- type: MovementSpeedModifier
baseWalkSpeed: 4
@@ -82,6 +81,7 @@
- type: Grammar
attributes:
gender: epicene
- type: CP14MagicCasterSlowdown
- type: CP14MagicEnergyContainer
magicAlert: CP14MagicEnergy
maxEnergy: 100
@@ -100,6 +100,8 @@
name: Subterranean leap
description: Make a subterranean leap, quickly approaching the victim.
components:
- type: CP14MagicEffectCastSlowdown
speedMultiplier: -1.0
- type: CP14MagicEffect
manaCost: 5
telegraphyEffects:
@@ -108,15 +110,19 @@
- CP14ImpactEffectDigging
effects:
- !type:CP14SpellCasterTeleport
needVision: false
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectDigging
- type: CP14MagicEffectCastingVisual
proto: CP14ImpactEffectDigging
- type: EntityWorldTargetAction
useDelay: 5
useDelay: 8
range: 10
checkCanAccess: false
itemIconStyle: BigAction
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
path: /Audio/Effects/gib3.ogg
icon:
sprite: _CP14/Effects/Magic/spells_icons_monster.rsi
state: subterranean_leap

View File

@@ -207,6 +207,7 @@
- type: Tag
tags:
- FootstepSound
- type: CP14MagicCasterSlowdown
- type: CP14MagicEnergyContainer
magicAlert: CP14MagicEnergy
maxEnergy: 100

View File

@@ -0,0 +1,46 @@
- type: entity
id: CP14MagicHealingStaff
parent:
- BaseItem
- CP14BaseWeaponDestructible
name: magic healing staff
description: A long, half-tech, half-magic stick designed to convert magical energy into healing spells.
components:
- type: Item
size: Ginormous
- type: Sprite
sprite: _CP14/Objects/Weapons/Magic/TwoHandedStaff/healing_staff.rsi
layers:
- state: icon
- type: Clothing
equipDelay: 1
unequipDelay: 1
sprite: _CP14/Objects/Weapons/Magic/TwoHandedStaff/healing_staff.rsi
quickEquip: false
breakOnMove: false
slots:
- neck
- type: Wieldable
- type: IncreaseDamageOnWield
damage:
types:
Blunt: 3
- type: MeleeWeapon
angle: 100
attackRate: 1.3
range: 1.3
wideAnimationRotation: 135
wideAnimation: CP14WeaponArcSlash
damage:
types:
Blunt: 2
soundHit:
collection: MetalThud
cPAnimationLength: 0.3
cPAnimationOffset: -1.3
- type: CP14SpellStorageRequireAttune
- type: CP14MagicAttuningItem
- type: CP14SpellStorageAccessHolding
- type: CP14SpellStorage
spells:
- CP14ActionSpellCureWounds

View File

@@ -18,7 +18,7 @@
quickEquip: false
breakOnMove: false
slots:
- back
- neck
- type: MeleeWeapon
angle: 120
attackRate: 0.7

View File

@@ -7,10 +7,7 @@
description: an extremely simple and effective weapon - a long straight and heavy stick.
components:
- type: Item
size: Normal
storedRotation: 45
shape:
- 0,0,0,3
size: Ginormous
- type: Sprite
sprite: _CP14/Objects/Weapons/Melee/BattleStaff/battleStaff.rsi
layers:
@@ -22,7 +19,7 @@
quickEquip: false
breakOnMove: false
slots:
- back
- neck
- type: Wieldable
- type: IncreaseDamageOnWield
damage:
@@ -32,7 +29,7 @@
angle: 100
attackRate: 1.3
range: 1.3
wideAnimationRotation: -30
wideAnimationRotation: 135
wideAnimation: CP14WeaponArcSlash
damage:
types:
@@ -40,6 +37,4 @@
soundHit:
collection: MetalThud
cPAnimationLength: 0.3
cPAnimationOffset: -1.3
- type: StaminaDamageOnHit
damage: 4
cPAnimationOffset: -1.3

View File

@@ -11,11 +11,20 @@
description: A small hammer. Good for carpentry work as well as for cracking skulls.
components:
- type: Item
size: Normal
storedRotation: -45
- type: Sprite
sprite: _CP14/Objects/Weapons/Melee/LightHammer/lightHammer.rsi
layers:
- state: icon
- type: Clothing
equipDelay: 0.25
unequipDelay: 0.25
#sprite: _CP14/Objects/Weapons/Melee/Dagger/dagger.rsi
quickEquip: false
breakOnMove: false
slots:
- belt
- type: MeleeWeapon
attackRate: 1.7
range: 1

View File

@@ -11,9 +11,9 @@
- type: Item
size: Normal
- type: Clothing
equipDelay: 0.25
unequipDelay: 0.25
sprite: _CP14/Objects/Weapons/Melee/Dagger/dagger.rsi
equipDelay: 0.35
unequipDelay: 0.35
sprite: _CP14/Objects/Weapons/Melee/Mace/mace.rsi
quickEquip: false
breakOnMove: false
slots:

View File

@@ -38,7 +38,7 @@
quickEquip: false
breakOnMove: false
slots:
- back
- neck
- type: MeleeWeapon
angle: 0
range: 1.2

View File

@@ -22,7 +22,7 @@
angle: 0
attackRate: 1.2
range: 1.2
wideAnimationRotation: -115
wideAnimationRotation: 135
wideAnimation: CP14WeaponArcThrust
damage:
types:

View File

@@ -9,10 +9,7 @@
description: the gold standard of edged weapons. Medium length, comfortable grip. No frills.
components:
- type: Item
size: Normal
storedRotation: 45
shape:
- 0,0,0,2
size: Ginormous
- type: Clothing
equipDelay: 0.45
unequipDelay: 0.45
@@ -20,7 +17,7 @@
quickEquip: false
breakOnMove: false
slots:
- back
- neck
- type: Sprite
sprite: _CP14/Objects/Weapons/Melee/Sword/sword.rsi
layers:
@@ -28,7 +25,7 @@
- type: MeleeWeapon
angle: 100
attackRate: 1.4
wideAnimationRotation: 210
wideAnimationRotation: 135
wideAnimation: CP14WeaponArcSlash
cPAnimationLength: 0.18
damage:

View File

@@ -18,7 +18,7 @@
quickEquip: false
breakOnMove: false
slots:
- back
- neck
- type: MeleeWeapon
angle: 120
attackRate: 0.7

View File

@@ -10,12 +10,12 @@
strippingWindowPos: 0,3
dependsOn: pants
displayName: Ring
- name: neck
slotTexture: neck
slotFlags: NECK
- name: mask
slotTexture: mask
slotFlags: MASK
uiWindowPos: 0,2
strippingWindowPos: 1,2
displayName: Neck
displayName: Mask
- name: eyes
slotTexture: eyes
slotFlags: EYES
@@ -66,12 +66,6 @@
uiWindowPos: 2,2
strippingWindowPos: 2,2
displayName: Cloak
- name: mask
slotTexture: mask
slotFlags: MASK
uiWindowPos: 2,3
strippingWindowPos: 2,1
displayName: Mask
# Main hotbar
- name: belt1
slotTexture: belt
@@ -97,6 +91,14 @@
uiWindowPos: 0,0
strippingWindowPos: 0,5
displayName: Back
- name: neck
slotTexture: neck
slotFlags: NECK
slotGroup: SecondHotbar
uiWindowPos: 0,0
strippingWindowPos: 1,2
displayName: Neck
dependsOn: shirt
# Right hand
# Left hand
- name: pocket1

View File

@@ -290,7 +290,7 @@
minLimit: 0
maxLimit: 2
loadouts:
- CP14ClothingRingCureWounds
- CP14MagicHealingStaff
- CP14ClothingRingManaGift
- CP14EnergyCrystalSmall
- CP14CrystalLampOrangeEmpty
@@ -306,10 +306,10 @@
- CP14BasePickaxe
- type: loadout
id: CP14ClothingRingCureWounds
id: CP14MagicHealingStaff
storage:
back:
- CP14ClothingRingCureWounds
neck:
- CP14MagicHealingStaff
- type: loadout
id: CP14ClothingRingManaGift

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

View File

@@ -0,0 +1,34 @@
{
"version": 1,
"license": "CLA",
"copyright": "Created by TheShuEd (Github) 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-NECK",
"directions": 4
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

View File

@@ -27,7 +27,7 @@
"directions": 4
},
{
"name": "equipped-BACKPACK",
"name": "equipped-NECK",
"directions": 4
}
]

View File

@@ -27,7 +27,7 @@
"directions": 4
},
{
"name": "equipped-BACKPACK",
"name": "equipped-NECK",
"directions": 4
}
]

View File

@@ -19,7 +19,7 @@
"directions": 4
},
{
"name": "equipped-BACKPACK",
"name": "equipped-NECK",
"directions": 4
}
]

View File

@@ -19,7 +19,7 @@
"directions": 4
},
{
"name": "equipped-BACKPACK",
"name": "equipped-NECK",
"directions": 4
}
]

View File

@@ -27,7 +27,7 @@
"directions": 4
},
{
"name": "equipped-BACKPACK",
"name": "equipped-NECK",
"directions": 4
}
]

View File

@@ -27,7 +27,7 @@
"directions": 4
},
{
"name": "equipped-BACKPACK",
"name": "equipped-NECK",
"directions": 4
}
]

View File

@@ -124,6 +124,9 @@ CP14FlowersYellow: CP14Dayflin
CP14OldLantern: CP14CrystalLampBlueEmpty
CP14ClothingRingIceFloor: CP14ClothingRingManaGift
#2024-11-05
CP14ClothingRingCureWounds: CP14MagicHealingStaff
# <---> CrystallPunk migration zone end