Wendigo demiplane antag (#1174)

* wendigo

* ritual3

* Update sky_lightning.yml
This commit is contained in:
Ed
2025-04-12 17:32:53 +03:00
committed by GitHub
parent ee30ae1341
commit 517bc5418b
34 changed files with 521 additions and 28 deletions

View File

@@ -37,7 +37,7 @@ public sealed partial class CP14MagicSystem : CP14SharedMagicSystem
SubscribeLocalEvent<CP14SpellEffectOnHitComponent, MeleeHitEvent>(OnMeleeHit);
SubscribeLocalEvent<CP14SpellEffectOnHitComponent, ThrowDoHitEvent>(OnProjectileHit);
SubscribeLocalEvent<CP14MagicEffectVerbalAspectComponent, CP14VerbalAspectSpeechEvent>(OnSpellSpoken);
SubscribeLocalEvent<CP14MagicEffectVerbalAspectComponent, CP14SpellSpeechEvent>(OnSpellSpoken);
SubscribeLocalEvent<CP14MagicEffectCastingVisualComponent, CP14StartCastMagicEffectEvent>(OnSpawnMagicVisualEffect);
SubscribeLocalEvent<CP14MagicEffectCastingVisualComponent, CP14EndCastMagicEffectEvent>(OnDespawnMagicVisualEffect);
@@ -100,7 +100,7 @@ public sealed partial class CP14MagicSystem : CP14SharedMagicSystem
}
}
private void OnSpellSpoken(Entity<CP14MagicEffectVerbalAspectComponent> ent, ref CP14VerbalAspectSpeechEvent args)
private void OnSpellSpoken(Entity<CP14MagicEffectVerbalAspectComponent> ent, ref CP14SpellSpeechEvent args)
{
if (args.Performer is not null && args.Speech is not null)
_chat.TrySendInGameICMessage(args.Performer.Value, args.Speech, args.Emote ? InGameICChatType.Emote : InGameICChatType.Speak, true);

View File

@@ -22,6 +22,8 @@ public abstract partial class CP14SharedMagicSystem
//Verbal speaking
SubscribeLocalEvent<CP14MagicEffectVerbalAspectComponent, CP14StartCastMagicEffectEvent>(OnVerbalAspectStartCast);
SubscribeLocalEvent<CP14MagicEffectVerbalAspectComponent, CP14MagicEffectConsumeResourceEvent>(OnVerbalAspectAfterCast);
SubscribeLocalEvent<CP14MagicEffectEmotingComponent, CP14StartCastMagicEffectEvent>(OnEmoteStartCast);
SubscribeLocalEvent<CP14MagicEffectEmotingComponent, CP14MagicEffectConsumeResourceEvent>(OnEmoteEndCast);
}
/// <summary>
@@ -103,11 +105,11 @@ public abstract partial class CP14SharedMagicSystem
private void OnVerbalAspectStartCast(Entity<CP14MagicEffectVerbalAspectComponent> ent, ref CP14StartCastMagicEffectEvent args)
{
var ev = new CP14VerbalAspectSpeechEvent
var ev = new CP14SpellSpeechEvent
{
Performer = args.Performer,
Speech = Loc.GetString(ent.Comp.StartSpeech),
Emote = ent.Comp.Emote
Emote = false,
};
RaiseLocalEvent(ent, ref ev);
}
@@ -117,13 +119,38 @@ public abstract partial class CP14SharedMagicSystem
if (_net.IsClient)
return;
var ev = new CP14VerbalAspectSpeechEvent
var ev = new CP14SpellSpeechEvent
{
Performer = args.Performer,
Speech = Loc.GetString(ent.Comp.EndSpeech),
Emote = ent.Comp.Emote
Emote = false
};
RaiseLocalEvent(ent, ref ev);
}
private void OnEmoteStartCast(Entity<CP14MagicEffectEmotingComponent> ent, ref CP14StartCastMagicEffectEvent args)
{
var ev = new CP14SpellSpeechEvent
{
Performer = args.Performer,
Speech = Loc.GetString(ent.Comp.StartEmote),
Emote = true,
};
RaiseLocalEvent(ent, ref ev);
}
private void OnEmoteEndCast(Entity<CP14MagicEffectEmotingComponent> ent, ref CP14MagicEffectConsumeResourceEvent args)
{
if (_net.IsClient)
return;
var ev = new CP14SpellSpeechEvent
{
Performer = args.Performer,
Speech = Loc.GetString(ent.Comp.EndEmote),
Emote = true
};
RaiseLocalEvent(ent, ref ev);
}
}

View File

@@ -24,7 +24,7 @@ public abstract partial class CP14SharedMagicSystem
if (_doAfter.IsRunning(action.Comp.ActiveDoAfter))
return false;
var fromItem = action.Comp.SpellStorage is not null;
var fromItem = action.Comp.SpellStorage is not null && action.Comp.SpellStorage.Value != performer;
var doAfterEventArgs = new DoAfterArgs(EntityManager, performer, MathF.Max(delayedEffect.CastDelay, 0.3f), doAfter, action, used: action.Comp.SpellStorage, target: target)
{

View File

@@ -75,7 +75,7 @@ public abstract partial class CP14SharedMagicSystem
var evStart = new CP14StartCastMagicEffectEvent(performer);
RaiseLocalEvent(action, ref evStart);
var fromItem = action.Comp.SpellStorage is not null;
var fromItem = action.Comp.SpellStorage is not null && action.Comp.SpellStorage.Value != performer;
var doAfterEventArgs = new DoAfterArgs(EntityManager, performer, toggleable.CastTime, doAfter, action, used: action.Comp.SpellStorage, target: _target)
{

View File

@@ -0,0 +1,14 @@
namespace Content.Shared._CP14.MagicSpell.Components;
/// <summary>
/// Requires the user to be able to speak in order to use this spell. Also forces the user to use certain phrases at the beginning and end of a spell cast
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedMagicSystem))]
public sealed partial class CP14MagicEffectEmotingComponent : Component
{
[DataField]
public string StartEmote = string.Empty; //Not LocId!
[DataField]
public string EndEmote = string.Empty; //Not LocId!
}

View File

@@ -11,16 +11,13 @@ public sealed partial class CP14MagicEffectVerbalAspectComponent : Component
[DataField]
public string EndSpeech = string.Empty; //Not LocId!
[DataField]
public bool Emote = false;
}
/// <summary>
/// patch to send an event to the server for saying a phrase out loud
/// </summary>
[ByRefEvent]
public sealed class CP14VerbalAspectSpeechEvent : EntityEventArgs
public sealed class CP14SpellSpeechEvent : EntityEventArgs
{
public EntityUid? Performer { get; init; }

Binary file not shown.

View File

@@ -0,0 +1,19 @@
- files: ["ritual1.ogg"]
license: "CC-BY-SA-4.0"
copyright: "from Freesound by Calamity.chr"
source: "https://freesound.org/people/Calamity.chr/sounds/638657/"
- files: ["ritual2.ogg"]
license: "CC-BY-NC-4.0"
copyright: "from Freesound by Calamity.chr"
source: "https://freesound.org/people/Calamity.chr/sounds/635178/"
- files: ["ritual3.ogg"]
license: "CC0-1.0"
copyright: "from Freesound by J.R.Mythical"
source: "https://freesound.org/people/J.R.Mythical/sounds/563687/"
- files: ["ambient.ogg"]
license: "CC0-1.0"
copyright: "from Freesound by onderwish"
source: "https://freesound.org/people/onderwish/sounds/469623/"

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,2 +1,5 @@
cp14-ghost-role-information-name-skeleton = Undead skeleton
cp14-ghost-role-information-description-skeleton = The spawn of necromancy, putting a living soul into dead bones. Often such souls are controlled by the necromancer, doing his bidding.
cp14-ghost-role-information-description-skeleton = The spawn of necromancy, putting a living soul into dead bones. Often such souls are controlled by the necromancer, doing his bidding.
cp14-ghost-role-information-name-wendigo = Wendigo
cp14-ghost-role-information-description-wendigo = A spirit of night and hunger that preys on loners separated from their companions.

View File

@@ -1,2 +1,5 @@
cp14-kick-emote-start = kicks in...
cp14-kick-emote = makes a strong kick
cp14-kick-emote = makes a strong kick
cp14-kick-wendigo-start = makes a huge fist...
cp14-kick-wendigo = delivers a stunning blow

View File

@@ -1,2 +1,5 @@
cp14-ghost-role-information-name-skeleton = Оживленный скелет
cp14-ghost-role-information-description-skeleton = Порождение некромантии, вселившее живую душу в мертвые кости. Часто такие души контролируются некромантом, исполняя его волю.
cp14-ghost-role-information-description-skeleton = Порождение некромантии, вселившее живую душу в мертвые кости. Часто такие души контролируются некромантом, исполняя его волю.
cp14-ghost-role-information-name-wendigo = Вендиго
cp14-ghost-role-information-description-wendigo = Дух ночи и голода, охотящийся за одиночками, отделившихся от своих товарищей.

View File

@@ -1,2 +1,5 @@
cp14-kick-emote-start = заносит ногу...
cp14-kick-emote = совершает сильный пинок
cp14-kick-emote = совершает сильный пинок
cp14-kick-wendigo-start = заносит огромный кулак...
cp14-kick-wendigo = обрушивает оглушающий удар

View File

@@ -27,10 +27,9 @@
damage:
types:
Blunt: 5
- type: CP14MagicEffectVerbalAspect
startSpeech: cp14-kick-emote-start
endSpeech: cp14-kick-emote
emote: true
- type: CP14MagicEffectEmoting
startEmote: cp14-kick-emote-start
endEmote: cp14-kick-emote
- type: CP14MagicEffectPacifiedBlock
- type: EntityTargetAction
canTargetSelf: false

View File

@@ -0,0 +1,72 @@
- type: entity
id: CP14ActionSpellWendigoFear
name: Primal terror
description: You plunge the target into primal terror, robbing them of the ability to fight and speak.
components:
- type: Sprite
sprite: _CP14/Actions/Spells/wendigo.rsi
state: fear
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.2
- type: CP14MagicEffect
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectWendigoFear
- !type:CP14SpellApplyEntityEffect
effects:
- !type:MovespeedModifier
walkSpeedModifier: 0.2
sprintSpeedModifier: 0.2
statusLifetime: 2
- !type:Jitter
- !type:GenericStatusEffect
key: Pacified
component: Pacified
type: Add
time: 2
- type: CP14MagicEffectCastingVisual
proto: CP14RuneWendigoFear
- type: EntityTargetAction
whitelist:
components:
- MobState
range: 15
itemIconStyle: BigAction
canTargetSelf: false
interactOnMiss: false
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
icon:
sprite: _CP14/Actions/Spells/wendigo.rsi
state: fear
event: !type:CP14ToggleableEntityTargetActionEvent
cooldown: 30
castTime: 30
breakOnMove: false
hidden: true
- type: entity
id: CP14ImpactEffectWendigoFear
parent: CP14BaseMagicImpact
categories: [ HideSpawnMenu ]
save: false
components:
- type: Sprite
sprite: _CP14/Effects/Magic/cast_impact.rsi
layers:
- state: particles_down
color: "#2b2c32"
- type: entity
id: CP14RuneWendigoFear
parent: CP14BaseMagicRune
categories: [ HideSpawnMenu ]
components:
- type: PointLight
color: "#2b2c32"
- type: Sprite
layers:
- state: double_outer
color: "#2b2c32"
shader: unshaded

View File

@@ -0,0 +1,49 @@
- type: entity
id: CP14ActionSpellWendigoKick
name: Crushing attack
description: You prepare a powerful melee strike that will knock your target back with force and stun them for a long time.
components:
- type: Sprite
sprite: _CP14/Actions/Spells/wendigo.rsi
state: kick
- type: CP14MagicEffectStaminaCost
stamina: 20
- type: CP14MagicEffect
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14WendigoRitualSound
effects:
- !type:CP14SpellApplyEntityEffect
effects:
- !type:Paralyze
paralyzeTime: 15
- !type:CP14SpellThrowFromUser
throwPower: 4
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14DustEffectKickSound
- !type:CP14SpellApplyEntityEffect
effects:
- !type:HealthChange
damage:
types:
Blunt: 5
- type: CP14MagicEffectEmoting
startEmote: cp14-kick-wendigo-start
endEmote: cp14-kick-wendigo
- type: CP14MagicEffectPacifiedBlock
- type: EntityTargetAction
canTargetSelf: false
range: 1
itemIconStyle: BigAction
icon:
sprite: _CP14/Actions/Spells/wendigo.rsi
state: kick
event: !type:CP14DelayedEntityTargetActionEvent
cooldown: 20
castDelay: 2.5
distanceThreshold: 1.5
breakOnMove: false
breakOnDamage: true
hidden: true

View File

@@ -0,0 +1,47 @@
- type: entity
id: CP14ActionSpellWendigoWarp
name: Shadow step
description: A step through the gash of reality that allows you to cover a small of distance quickly.
components:
- type: Sprite
sprite: _CP14/Actions/Spells/wendigo.rsi
state: step
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.8
- type: CP14MagicEffect
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectWendigoStep
effects:
- !type:CP14SpellCasterTeleport
needVision: false
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14WendigoRitualSound
- type: CP14MagicEffectCastingVisual
proto: CP14RuneWendigoFear
- type: EntityWorldTargetAction
checkCanAccess: false
range: 10
itemIconStyle: BigAction
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
icon:
sprite: _CP14/Actions/Spells/wendigo.rsi
state: step
event: !type:CP14DelayedEntityWorldTargetActionEvent
cooldown: 30
hidden: true
breakOnMove: false
- type: entity
id: CP14ImpactEffectWendigoStep
parent: CP14BaseMagicImpact
categories: [ HideSpawnMenu ]
save: false
components:
- type: Sprite
layers:
- state: wave_up
color: "#2b2c32"

View File

@@ -1,6 +1,7 @@
- type: entity
id: CP14SkyLightning
categories: [ ForkFiltered ]
name: sky lighting
save: false
components:
- type: Sprite
@@ -55,4 +56,42 @@
farSound:
collection: CP14LightningFar
params:
variation: 0.2
variation: 0.2
#- type: entity
# parent: CP14SkyLightning
# id: CP14SkyLightningWendigoRitual
# name: wendigo lightning
# suffix: 1000 Blunt damage
# components:
# - type: Sprite
# color: "#ed1367"
# - type: PointLight
# color: "#ed1367"
# - type: CP14AreaEntityEffect
# whitelist:
# components:
# - MobState
# range: 1
# effects:
# - !type:CP14SpellApplyEntityEffect
# effects:
# - !type:HealthChange
# damage:
# types:
# Blunt: 1000
# - type: CP14FarSound
# closeSound:
# path: /Audio/_CP14/Ambience/Lightning/lightning_close1.ogg
# params:
# variation: 0.2
# maxDistance: 20
# volume: -3
# farSound:
# collection: CP14LightningFar
# params:
# variation: 0.2
# volume: -3
# - type: ConditionalSpawner
# prototypes:
# - CP14WendigoRitualSound

View File

@@ -0,0 +1,163 @@
- type: entity
id: CP14MobWendigo
parent: CP14SimpleMobBase
name: wendigo
description: The spirit of hunger and night. Hunting lonely wanderers lost in the dark forest.
components:
- type: NpcFactionMember
factions:
- CP14Monster
- type: Sprite
drawdepth: Mobs
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
sprite: _CP14/Mobs/Monster/wendigo.rsi
state: live
- type: ReplacementAccent
accent: xeno
- type: Damageable
damageContainer: CP14Biological
damageModifierSet: CP14Dinosaur
- type: Appearance
- type: Body
prototype: Animal
- type: CombatMode
- type: Stamina
critThreshold: 200
- type: Grammar
attributes:
gender: epicene
- type: Bloodstream
bloodReagent: CP14BloodAnimal
- type: Tag
tags:
- FootstepSound
- type: DamageStateVisuals
states:
Alive:
Base: live
Dead:
Base: dead
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeCircle
radius: 0.35
density: 500
mask:
- MobMask
layer:
- MobLayer
- type: MobThresholds
thresholds:
0: Alive
100: Dead
- type: SlowOnDamage
speedModifierThresholds:
50: 0.6
- type: MeleeWeapon
soundHit:
collection: AlienClaw
angle: 30
animation: WeaponArcClaw
damage:
types:
Slash: 4
Piercing: 2
Structural: 5
- type: MovementSpeedModifier
baseWalkSpeed: 5
baseSprintSpeed: 6
acceleration: 16.0
- type: Climbing
- type: Butcherable
spawned:
- id: CP14FoodMeatDino
amount: 4
- id: CP14ClothingMaskBoneHornedMask
amount: 1
- type: FloorOcclusion
- type: Puller
needsHands: false
- type: GhostTakeoverAvailable
- type: TypingIndicator
proto: alien
- type: NoSlip
- type: Speech
speechSounds: CP14Carcat
- type: CP14NightVision
- type: FootstepModifier
footstepSoundCollection: null # Silent footstep
- type: CP14MagicCasterSlowdown
- type: CP14SpellStorage
grantAccessToSelf: true
spells:
- CP14ActionSpellWendigoFear
- CP14ActionSpellWendigoKick
- CP14ActionSpellWendigoWarp
- type: SpamEmitSound
minInterval: 20
maxInterval: 40
sound:
path: /Audio/_CP14/Effects/Wendigo/ambient.ogg
params:
volume: -8
variation: 0.125
- type: SoundWhileAlive
- type: Stealth
enabledOnDeath: false
maxVisibility: 1.2
- type: StealthOnMove
passiveVisibilityRate: -0.55
movementVisibilityRate: 0.55
- type: ConditionalSpawner
prototypes:
- CP14WendigoRitualSound
- type: entity
id: CP14WendigoRitualSound
name: wendigo ritual far sound
categories: [ ForkFiltered ]
components:
- type: CP14Lighthouse
- type: TriggerOnSpawn
- type: CP14FarSound
closeSound:
collection: CP14WendigoRitual
params:
variation: 0.2
maxDistance: 20
volume: 50
farSound:
collection: CP14WendigoRitual
params:
variation: 0.2
- type: TimedDespawn
lifetime: 2
- type: entity
id: SpawnPointGhostDemiplaneWendigo
name: ghost role spawn point
description: A ghost role for a wendigo
suffix: Wendigo
categories: [ ForkFiltered ]
parent: MarkerBase
components:
- type: GhostRole
name: cp14-ghost-role-information-name-wendigo
allowMovement: true
description: cp14-ghost-role-information-description-wendigo
rules: cp14-ghost-role-information-rules-demiplane
mindRoles:
- CP14MindRoleDemiplaneAntag
raffle:
settings: default
- type: GhostRoleMobSpawner
prototype: CP14MobWendigo
- type: Sprite
sprite: Markers/jobs.rsi
layers:
- state: green
- sprite: _CP14/Mobs/Monster/wendigo.rsi
state: live

View File

@@ -112,6 +112,7 @@
- type: TransferMindOnGib
- type: CP14DemiplaneStabilizer
enabled: false
- type: GhostTakeoverAvailable
- type: entity
parent: CP14BaseSpeciesDummy

View File

@@ -161,7 +161,6 @@
- CP14ClothingMaskSinner
- CP14ClothingMaskSteelMask
- CP14ClothingMaskNeckerchief
- CP14ClothingMaskBoneHornedMask
- CP14ClothingMaskMime
- type: loadout
@@ -179,11 +178,6 @@
equipment:
mask: CP14ClothingMaskNeckerchief
- type: loadout
id: CP14ClothingMaskBoneHornedMask
equipment:
mask: CP14ClothingMaskBoneHornedMask
- type: loadout
id: CP14ClothingMaskMime
equipment:

View File

@@ -88,6 +88,21 @@
minGroupSize: 1
maxGroupSize: 3
- type: cp14DemiplaneModifier
id: EnemyWendigo
levels:
min: 3
max: 10
generationWeight: 1.5
categories:
Danger: 0.5
layers:
- !type:OreDunGen
entity: SpawnPointGhostDemiplaneWendigo
count: 1
minGroupSize: 1
maxGroupSize: 1
# TIER 2
- type: cp14DemiplaneModifier

View File

@@ -26,4 +26,11 @@
files:
- /Audio/_CP14/Ambience/Lightning/lightning_far1.ogg
- /Audio/_CP14/Ambience/Lightning/lightning_far2.ogg
- /Audio/_CP14/Ambience/Lightning/lightning_far3.ogg
- /Audio/_CP14/Ambience/Lightning/lightning_far3.ogg
- type: soundCollection
id: CP14WendigoRitual
files:
- /Audio/_CP14/Effects/Wendigo/ritual1.ogg
- /Audio/_CP14/Effects/Wendigo/ritual2.ogg
- /Audio/_CP14/Effects/Wendigo/ritual3.ogg

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

View File

@@ -0,0 +1,20 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "All right reserved",
"copyright": "Created by TheShuEd",
"states": [
{
"name": "fear"
},
{
"name": "kick"
},
{
"name": "step"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -0,0 +1,18 @@
{
"version": 1,
"size": {
"x": 64,
"y": 64
},
"license": "All right reserved",
"copyright": "Created by TheShuEd (github)",
"states": [
{
"name": "live",
"directions": 4
},
{
"name": "dead"
}
]
}