Slimes mob (#1049)

* import sprites

* pipia

* 3 slime types

* Delete generic_magic_effects.yml

* Update scrolls.yml

* demiplane integration

* Update fire.yml

* Update crystals.yml

* local

* Update fire.yml

* fix AI stuck

* Update base.yml

* loot

* Update mobs.yml
This commit is contained in:
Ed
2025-03-23 14:14:08 +03:00
committed by GitHub
parent 5512e1a665
commit eaf9c009c1
19 changed files with 672 additions and 20 deletions

View File

@@ -0,0 +1,20 @@
using Content.Shared.EntityEffects;
namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellApplyEntityEffectOnUser : CP14SpellEffect
{
[DataField(required: true, serverOnly: true)]
public List<EntityEffect> Effects = new();
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
if (args.User == null)
return;
foreach (var effect in Effects)
{
effect.Effect(new EntityEffectBaseArgs(args.User.Value, entManager));
}
}
}

View File

@@ -0,0 +1,19 @@
using Content.Shared.Throwing;
namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellThrowUserTo : CP14SpellEffect
{
[DataField]
public float ThrowPower = 10f;
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
if (args.Position is null || args.User is null)
return;
var throwing = entManager.System<ThrowingSystem>();
throwing.TryThrow(args.User.Value, args.Position.Value, ThrowPower);
}
}

View File

@@ -1,5 +1,6 @@
cp14-demiplane-location-cave = Dark caves
cp14-demiplane-location-cave-grass = Overgrown caves
cp14-demiplane-location-cave-magma = Flaming caves
cp14-demiplane-location-grassland-island = Green Island
cp14-demiplane-location-ice-cave = Ice caves
cp14-demiplane-location-snow-island = Snowy island

View File

@@ -1,5 +1,6 @@
cp14-demiplane-location-cave = Темные пещеры
cp14-demiplane-location-cave-grass = Заросшие пещеры
cp14-demiplane-location-cave-magma = Раскаленные пещеры
cp14-demiplane-location-grassland-island = Зеленый остров
cp14-demiplane-location-ice-cave = Ледяные пещеры
cp14-demiplane-location-snow-island = Заснеженный остров

View File

@@ -16,6 +16,7 @@
damage:
types:
Heat: 1
- type: Appearance
- type: FireVisuals
sprite: Effects/fire.rsi
normalState: fire

View File

@@ -0,0 +1,142 @@
- type: entity
id: CP14MobSlimeBase
parent: [ CP14SimpleMobBase, MobCombat ]
name: slime
description: A clot of semi-intelligent slime sensitive to the elemental elements. And happy to slime the skin off your face.
components:
- type: HTN
rootTask:
task: CP14MonsterCompound
blackboard:
NavSmash: !type:Bool
true
VisionRadius: !type:Single
12
AggroVisionRadius: !type:Single
8
- type: NPCUseActionOnTarget
actionId: CP14ActionSpellSlimeJump
- type: Sprite
drawdepth: Mobs
sprite: _CP14/Mobs/Monster/slime.rsi
layers:
- map: ["enum.DamageStateVisualLayers.Base", "movement"]
state: base
- type: SpriteMovement
movementLayers:
movement:
state: jump
noMovementLayers:
movement:
state: base
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeCircle
radius: 0.30
density: 80
mask:
- MobMask
layer:
- MobLayer
- ItemMask
- type: NpcFactionMember
factions:
- CP14Monster
- type: MovementSpeedModifier
baseWalkSpeed: 1
baseSprintSpeed: 2
- type: FootstepModifier
footstepSoundCollection:
path: /Audio/Effects/Footsteps/slime1.ogg
params:
volume: 3
- type: Damageable
damageContainer: Biological
damageModifierSet: Slime
- type: MeleeWeapon
altDisarm: false
soundHit:
path: /Audio/Weapons/punch3.ogg
angle: 0
animation: WeaponArcPunch
damage:
types:
Blunt: 5
- type: InteractionPopup
successChance: 0.5
interactSuccessString: petting-success-slimes
interactFailureString: petting-failure-generic
- type: Speech
speechVerb: Slime
speechSounds: Slime
- type: TypingIndicator
proto: slime
- type: SolutionContainerManager
solutions:
slime:
maxVol: 50
reagents:
- ReagentId: CP14ChromiumSlime
Quantity: 20
- ReagentId: CP14BasicEffectEmpty
Quantity: 30
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 30
behaviors:
- !type:SpillBehavior
solution: slime
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: EntityStorage
isCollidableWhenOpen: true
enteringOffset: 0, 0
capacity: 2
showContents: true
occludesLight: false
- type: CP14MagicCasterSlowdown
- type: EntityTableContainerFill
containers:
entity_storage: !type:GroupSelector
children:
- !type:GroupSelector
children:
- id: CP14OreCopper1
- id: CP14OreIron1
- id: CP14ScrapCopper
- id: CP14ScrapIron
- id: CP14CopperCoin1
weight: 3
- type: entity
id: CP14ActionSpellSlimeJump
name: Slime jump
description: Jump! JUMP!
components:
- type: Sprite
sprite: _CP14/Actions/Spells/physical.rsi
state: kick #TODO
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.1
- type: CP14MagicEffect
effects:
- !type:CP14SpellThrowUserTo
throwPower: 8
- type: EntityWorldTargetAction
useDelay: 8
range: 10
checkCanAccess: false
itemIconStyle: BigAction
icon:
sprite: _CP14/Actions/Spells/physical.rsi
state: kick #TODO
event: !type:CP14DelayedEntityWorldTargetActionEvent
hidden: true
breakOnMove: false
breakOnDamage: false
castDelay: 1
raiseOnUser: true

View File

@@ -0,0 +1,93 @@
- type: entity
id: CP14MobSlimeElectric
parent: CP14MobSlimeBase
name: electric slime
components:
- type: Sprite
layers:
- map: ["enum.DamageStateVisualLayers.Base", "movement"]
state: base
color: "#f7f00c"
shader: unshaded
- type: PointLight
color: "#f7f00c"
energy: 5
radius: 1.8
- type: SolutionContainerManager
solutions:
slime:
maxVol: 50
reagents:
- ReagentId: CP14ChromiumSlime
Quantity: 20
- ReagentId: CP14EssenceEnergia
Quantity: 30
- type: MeleeWeapon
altDisarm: false
soundHit:
path: /Audio/Weapons/punch3.ogg
angle: 0
animation: WeaponArcPunch
damage:
types:
Blunt: 3
Shock: 3
- type: CP14SpellEffectOnHit
prob: 0.75
effects:
- !type:CP14SpellApplyEntityEffect
effects:
- !type:Electrocute
electrocuteTime: 0.5
electrocuteDamageScale: 1
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ElectrifiedEffect
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 30
behaviors:
- !type:SpillBehavior
solution: slime
- !type:SpawnEntitiesBehavior
spawn:
CP14AreaEntityEffectSlimeShock:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: entity
id: CP14AreaEntityEffectSlimeShock
parent: CP14BaseMagicImpact
categories: [ HideSpawnMenu ]
components:
- type: PointLight
color: "#f7f00c"
- type: Sprite
noRot: true
drawdepth: BelowFloor
sprite: _CP14/Effects/Magic/area_impact.rsi
layers:
- state: area_impact_out
color: "#f7f00c"
scale: 2, 2
shader: unshaded
- type: TimedDespawn
lifetime: 0.2
- type: CP14AreaEntityEffect
range: 2
whitelist:
components:
- Damageable
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ElectrifiedEffect
- !type:CP14SpellApplyEntityEffect
effects:
- !type:Electrocute
electrocuteTime: 3.5
electrocuteDamageScale: 1

View File

@@ -0,0 +1,103 @@
- type: entity
id: CP14MobSlimeFire
parent: CP14MobSlimeBase
name: fire slime
components:
- type: Sprite
layers:
- map: ["enum.DamageStateVisualLayers.Base", "movement"]
state: base
color: "#f7570c"
shader: unshaded
- type: PointLight
color: "#f7570c"
energy: 5
radius: 1.8
- type: SolutionContainerManager
solutions:
slime:
maxVol: 50
reagents:
- ReagentId: CP14ChromiumSlime
Quantity: 20
- ReagentId: CP14EssenceFire
Quantity: 20
- ReagentId: CP14BasicEffectDamageHeat
Quantity: 10
- type: MeleeWeapon
altDisarm: false
soundHit:
path: /Audio/Weapons/punch3.ogg
angle: 0
animation: WeaponArcPunch
damage:
types:
Blunt: 3
Heat: 3
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 30
behaviors:
- !type:SpillBehavior
solution: slime
- !type:SpawnEntitiesBehavior
spawn:
CP14AreaEntityEffectSlimeIgnite:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: IgniteOnMeleeHit
fireStacks: 1
- type: EntityTableContainerFill
containers:
entity_storage: !type:GroupSelector
children:
- !type:GroupSelector
children:
- id: CP14OreCopper1
- id: CP14OreIron1
- id: CP14ScrapCopper
- id: CP14ScrapIron
- id: CP14FoodMeatLambCutletCooked
- id: CP14CopperCoin1
- id: CP14CrystalShardFire
weight: 3
- type: entity
id: CP14AreaEntityEffectSlimeIgnite
parent: CP14BaseMagicImpact
categories: [ HideSpawnMenu ]
components:
- type: PointLight
color: "#eea911"
- type: Sprite
noRot: true
drawdepth: BelowFloor
sprite: _CP14/Effects/Magic/area_impact.rsi
layers:
- state: area_impact_out
color: "#eea911"
scale: 2, 2
shader: unshaded
- type: TimedDespawn
lifetime: 0.2
- type: CP14AreaEntityEffect
range: 2
whitelist:
components:
- MobState
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectTieflingRevenge
- !type:CP14SpellApplyEntityEffect
effects:
- !type:Jitter
- !type:FlammableReaction
multiplier: 1.5
- !type:AdjustTemperature
amount: 6000
- !type:Ignite

View File

@@ -0,0 +1,117 @@
- type: entity
id: CP14MobSlimeIce
parent: CP14MobSlimeBase
name: ice slime
components:
- type: Sprite
layers:
- map: ["enum.DamageStateVisualLayers.Base", "movement"]
state: base
color: "#0cb1f7"
shader: unshaded
- type: PointLight
color: "#0cb1f7"
energy: 5
radius: 1.8
- type: SolutionContainerManager
solutions:
slime:
maxVol: 50
reagents:
- ReagentId: CP14ChromiumSlime
Quantity: 20
- ReagentId: CP14EssenceWater
Quantity: 30
- type: MeleeWeapon
altDisarm: false
soundHit:
path: /Audio/Weapons/punch3.ogg
angle: 0
animation: WeaponArcPunch
damage:
types:
Blunt: 3
Cold: 3
- type: CP14SpellEffectOnHit
whitelist:
components:
- MobState
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectFreeze
- !type:CP14SpellApplyEntityEffect
effects:
- !type:MovespeedModifier
walkSpeedModifier: 0.75
sprintSpeedModifier: 0.75
statusLifetime: 2
- !type:AdjustTemperature
amount: -6000
- !type:ExtinguishReaction
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 30
behaviors:
- !type:SpillBehavior
solution: slime
- !type:SpawnEntitiesBehavior
spawn:
CP14AreaEntityEffectSlimeFroze:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: EntityTableContainerFill
containers:
entity_storage: !type:GroupSelector
children:
- !type:GroupSelector
children:
- id: CP14OreCopper1
- id: CP14OreIron1
- id: CP14ScrapCopper
- id: CP14ScrapIron
- id: CP14Snowball
- id: CP14CopperCoin1
- id: CP14CrystalShardWater
weight: 3
- type: entity
id: CP14AreaEntityEffectSlimeFroze
parent: CP14BaseMagicImpact
categories: [ HideSpawnMenu ]
components:
- type: PointLight
color: "#0cb1f7"
- type: Sprite
noRot: true
drawdepth: BelowFloor
sprite: _CP14/Effects/Magic/area_impact.rsi
layers:
- state: area_impact_out
color: "#0cb1f7"
scale: 2, 2
shader: unshaded
- type: TimedDespawn
lifetime: 0.2
- type: CP14AreaEntityEffect
range: 2
whitelist:
components:
- MobState
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectFreeze
- !type:CP14SpellApplyEntityEffect
effects:
- !type:MovespeedModifier
walkSpeedModifier: 0.5
sprintSpeedModifier: 0.5
statusLifetime: 5
- !type:AdjustTemperature
amount: -82000
- !type:ExtinguishReaction

View File

@@ -1,14 +1,14 @@
- type: cp14DemiplaneLocation
id: T1CavesRing
id: T1MagmaCaves
levels:
min: 3
max: 6
max: 10
locationConfig: CP14DemiplaneCavesRing
name: cp14-demiplane-location-cave
name: cp14-demiplane-location-cave-magma
tags:
- CP14DemiplaneOres
- CP14DemiplaneUnderground
- CP14DemiplanePeacefulAnimals
- CP14DemiplaneHot
components:
- type: Biome
template: CP14LavaOceanFill
@@ -41,7 +41,7 @@
- !type:NoiseDistanceDunGen
size: 120, 120
distanceConfig: !type:DunGenEuclideanSquaredDistance
blendWeight: 0.9
blendWeight: 0.7
layers:
- tile: CP14FloorSand
threshold: 0.50
@@ -59,7 +59,7 @@
- !type:NoiseDistanceDunGen
size: 110, 110
distanceConfig: !type:DunGenEuclideanSquaredDistance
blendWeight: 0.9
blendWeight: 0.8
layers:
- tile: CP14FloorGrass
threshold: 0.50
@@ -77,7 +77,7 @@
- !type:NoiseDistanceDunGen
size: 80, 80
distanceConfig: !type:DunGenEuclideanSquaredDistance
blendWeight: 0.9
blendWeight: 0.7
layers:
- tile: CP14FloorSand
threshold: 0.50
@@ -95,7 +95,7 @@
- !type:NoiseDistanceDunGen
size: 50, 50
distanceConfig: !type:DunGenEuclideanSquaredDistance
blendWeight: 0.8
blendWeight: 0.6
layers:
- tile: Space
threshold: 0.50
@@ -105,4 +105,18 @@
fractalType: FBm
octaves: 5
lacunarity: 2
gain: 0.5
- !type:NoiseDistanceDunGen
size: 80, 50
distanceConfig: !type:DunGenEuclideanSquaredDistance
blendWeight: 0.2
layers:
- tile: Space
threshold: 0.50
noise:
frequency: 0.08
noiseType: OpenSimplex2
fractalType: FBm
octaves: 5
lacunarity: 2
gain: 0.5

View File

@@ -46,7 +46,7 @@
- type: cp14DemiplaneModifier
id: Explosive
levels:
min: 7
min: 6
max: 10
name: cp14-modifier-explosive
generationWeight: 0.25

View File

@@ -44,6 +44,8 @@
Danger: 0.2
requiredTags:
- CP14DemiplaneHerbals
blacklistTags:
- CP14DemiplaneHot
layers:
- !type:OreDunGen
entity: CP14SpawnMobMonsterMosquito
@@ -113,6 +115,8 @@
Danger: 0.4
requiredTags:
- CP14DemiplaneCold
blacklistTags:
- CP14DemiplaneHot
layers:
- !type:OreDunGen
entity: CP14MobIceSpectre
@@ -136,3 +140,63 @@
count: 2
minGroupSize: 1
maxGroupSize: 2
- type: cp14DemiplaneModifier
id: MobSlimeElectric
levels:
min: 1
max: 10
categories:
Danger: 0.3
layers:
- !type:OreDunGen
entity: CP14MobSlimeElectric
count: 3
minGroupSize: 4
maxGroupSize: 5
- type: cp14DemiplaneModifier
id: MobSlimeFire
levels:
min: 1
max: 10
categories:
Danger: 0.3
requiredTags:
- CP14DemiplaneHot
layers:
- !type:OreDunGen
entity: CP14MobSlimeFire
count: 3
minGroupSize: 4
maxGroupSize: 5
- type: cp14DemiplaneModifier
id: MobSlimeIce
levels:
min: 1
max: 10
categories:
Danger: 0.3
requiredTags:
- CP14DemiplaneCold
layers:
- !type:OreDunGen
entity: CP14MobSlimeIce
count: 3
minGroupSize: 4
maxGroupSize: 5
- type: cp14DemiplaneModifier
id: MobSlimeBase
levels:
min: 1
max: 10
categories:
Danger: 0.25
layers:
- !type:OreDunGen
entity: CP14MobSlimeBase
count: 3
minGroupSize: 4
maxGroupSize: 5

View File

@@ -40,7 +40,7 @@
- CP14FloorGrassLight
- CP14FloorGrassTall
entity: CP14BaseLucensTreeLarge
count: 10
count: 5
minGroupSize: 1
maxGroupSize: 1

View File

@@ -26,10 +26,8 @@
generationWeight: 0.1
categories:
Reward: 0.1
requiredTags: #TODO: Hot places
- CP14DemiplaneUnderground
blacklistTags:
- CP14DemiplaneCold
requiredTags:
- CP14DemiplaneHot
layers:
- !type:OreDunGen
entity: CP14CrystalFire

View File

@@ -26,9 +26,6 @@
- type: Tag
id: CP14DemiplaneCold
#Cold
#Hot
#Dry
- type: Tag
id: CP14DemiplaneHot

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,82 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "All right reserved",
"copyright": "Created by Max Gab (Github)",
"states": [
{
"name": "icon"
},
{
"name": "base",
"directions": 4,
"delays": [
[
0.2,
0.2,
0.2,
0.2
],
[
0.2,
0.2,
0.2,
0.2
],
[
0.2,
0.2,
0.2,
0.2
],
[
0.2,
0.2,
0.2,
0.2
]
]
},
{
"name": "jump",
"directions": 4,
"delays": [
[
0.2,
0.2,
0.2,
0.2,
0.2,
0.2
],
[
0.2,
0.2,
0.2,
0.2,
0.2,
0.2
],
[
0.2,
0.2,
0.2,
0.2,
0.2,
0.2
],
[
0.2,
0.2,
0.2,
0.2,
0.2,
0.2
]
]
}
]
}