Magic redesign (#594)

* water spell textures

* water creation spell

* mana consume, and mana glove

* remove mana transfer ring

* Update migration.yml

* copy Wizden loadout PR

* add sprite component to all spells

* spell dummy loadouts

* delete spell traits

* really give spells from loadouts

* update crates fill and demiplane spawners

* beer creation spell, fix passivedamage

* Update PassiveDamageSystem.cs
This commit is contained in:
Ed
2024-11-20 00:23:44 +03:00
committed by GitHub
parent ec278dc98f
commit e79b046c4a
50 changed files with 742 additions and 197 deletions

View File

@@ -36,17 +36,18 @@ public sealed partial class LoadoutContainer : BoxContainer
if (_protoManager.TryIndex(proto, out var loadProto))
{
var ent = _entManager.System<LoadoutSystem>().GetFirstOrNull(loadProto);
var ent = loadProto.DummyEntity ?? _entManager.System<LoadoutSystem>().GetFirstOrNull(loadProto);
if (ent != null)
{
_entity = _entManager.SpawnEntity(ent, MapCoordinates.Nullspace);
Sprite.SetEntity(_entity);
if (ent == null)
return;
var spriteTooltip = new Tooltip();
spriteTooltip.SetMessage(FormattedMessage.FromUnformatted(_entManager.GetComponent<MetaDataComponent>(_entity.Value).EntityDescription));
TooltipSupplier = _ => spriteTooltip;
}
_entity = _entManager.SpawnEntity(ent, MapCoordinates.Nullspace);
Sprite.SetEntity(_entity);
var spriteTooltip = new Tooltip();
spriteTooltip.SetMessage(FormattedMessage.FromUnformatted(_entManager.GetComponent<MetaDataComponent>(_entity.Value).EntityDescription));
TooltipSupplier = _ => spriteTooltip;
}
}

View File

@@ -16,7 +16,6 @@ public sealed class TraitSystem : EntitySystem
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly SharedHandsSystem _sharedHandsSystem = default!;
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
[Dependency] private readonly ActionsSystem _action = default!; //CP14
public override void Initialize()
{
@@ -48,13 +47,6 @@ public sealed class TraitSystem : EntitySystem
_whitelistSystem.IsBlacklistPass(traitPrototype.Blacklist, args.Mob))
continue;
// CP14 start - add all spells to player mind
foreach (var spell in traitPrototype.Actions)
{
_action.AddAction(args.Mob, spell);
}
//CP14 end
// Add all components required by the prototype
if (traitPrototype.Components.Count > 0) //CP14 added check
EntityManager.AddComponents(args.Mob, traitPrototype.Components, false);

View File

@@ -90,6 +90,9 @@ public sealed class LoadoutSystem : EntitySystem
public string GetName(LoadoutPrototype loadout)
{
if (loadout.DummyEntity is not null && _protoMan.TryIndex<EntityPrototype>(loadout.DummyEntity, out var proto))
return proto.Name;
if (_protoMan.TryIndex(loadout.StartingGear, out var gear))
{
return GetName(gear);

View File

@@ -11,10 +11,14 @@ public sealed class PassiveDamageSystem : EntitySystem
[Dependency] private readonly DamageableSystem _damageable = default!;
[Dependency] private readonly IGameTiming _timing = default!;
private EntityQuery<MobStateComponent> _mobStateQuery; //CP14
public override void Initialize()
{
base.Initialize();
_mobStateQuery = GetEntityQuery<MobStateComponent>(); //CP14
SubscribeLocalEvent<PassiveDamageComponent, MapInitEvent>(OnPendingMapInit);
}
@@ -30,8 +34,8 @@ public sealed class PassiveDamageSystem : EntitySystem
var curTime = _timing.CurTime;
// Go through every entity with the component
var query = EntityQueryEnumerator<PassiveDamageComponent, DamageableComponent, MobStateComponent>();
while (query.MoveNext(out var uid, out var comp, out var damage, out var mobState))
var query = EntityQueryEnumerator<PassiveDamageComponent, DamageableComponent /*, MobStateComponent*/>();
while (query.MoveNext(out var uid, out var comp, out var damage /*, out var mobState*/))
{
// Make sure they're up for a damage tick
if (comp.NextDamage > curTime)
@@ -43,12 +47,27 @@ public sealed class PassiveDamageSystem : EntitySystem
// Set the next time they can take damage
comp.NextDamage = curTime + TimeSpan.FromSeconds(1f);
// Damage them
foreach (var allowedState in comp.AllowedStates)
//CP14 logic replacement
//
//// Damage them
//foreach (var allowedState in comp.AllowedStates)
//{
// if(allowedState == mobState.CurrentState)
// _damageable.TryChangeDamage(uid, comp.Damage, true, false, damage);
//}
if (comp.AllowedStates.Count > 0 && _mobStateQuery.TryComp(uid, out var mobState))
{
if(allowedState == mobState.CurrentState)
_damageable.TryChangeDamage(uid, comp.Damage, true, false, damage);
foreach (var allowedState in comp.AllowedStates)
{
if(allowedState == mobState.CurrentState)
_damageable.TryChangeDamage(uid, comp.Damage, true, false, damage);
}
}
else
{
_damageable.TryChangeDamage(uid, comp.Damage, true, false, damage);
}
//CP14 logic replacement end
}
}
}

View File

@@ -17,6 +17,12 @@ public sealed partial class LoadoutPrototype : IPrototype, IEquipmentLoadout
* You can either use an existing StartingGearPrototype or specify it inline to avoid bloating yaml.
*/
/// <summary>
/// An entity whose sprite, name and description is used for display in the interface. If null, tries to get the proto of the item from gear (if it is a single item).
/// </summary>
[DataField]
public EntProtoId? DummyEntity;
[DataField]
public ProtoId<StartingGearPrototype>? StartingGear;
@@ -38,4 +44,10 @@ public sealed partial class LoadoutPrototype : IPrototype, IEquipmentLoadout
/// <inheritdoc />
[DataField]
public Dictionary<string, List<EntProtoId>> Storage { get; set; } = new();
/// <summary>
/// CP14 - it is possible to give action spells or spells to players who have taken this loadout
/// </summary>
[DataField]
public List<EntProtoId> Actions { get; set; } = new();
}

View File

@@ -1,4 +1,5 @@
using System.Linq;
using Content.Shared.Actions;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Inventory;
@@ -22,6 +23,7 @@ public abstract class SharedStationSpawningSystem : EntitySystem
[Dependency] private readonly MetaDataSystem _metadata = default!;
[Dependency] private readonly SharedStorageSystem _storage = default!;
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
[Dependency] private readonly SharedActionsSystem _action = default!; //CP14
private EntityQuery<HandsComponent> _handsQuery;
private EntityQuery<InventoryComponent> _inventoryQuery;
@@ -82,6 +84,15 @@ public abstract class SharedStationSpawningSystem : EntitySystem
{
EquipStartingGear(entity, loadout.StartingGear, raiseEvent);
EquipStartingGear(entity, (IEquipmentLoadout) loadout, raiseEvent);
CP14EquipStartingActions(entity, loadout);
}
private void CP14EquipStartingActions(EntityUid entity, LoadoutPrototype loadout)
{
foreach (var action in loadout.Actions)
{
_action.AddAction(entity, action);
}
}
/// <summary>

View File

@@ -60,10 +60,4 @@ public sealed partial class TraitPrototype : IPrototype
/// </summary>
[DataField]
public ProtoId<TraitCategoryPrototype>? Category;
/// <summary>
/// CP14 - adding permanent spells into players mind
/// </summary>
[DataField]
public List<EntProtoId> Actions = new();
}

View File

@@ -48,7 +48,7 @@ public abstract partial class CP14SharedMagicSystem
RaiseLocalEvent(args.Action, ref evStart);
var spellArgs =
new CP14SpellEffectBaseArgs(args.Performer, args.Performer, Transform(args.Performer).Coordinates);
new CP14SpellEffectBaseArgs(args.Performer, magicEffect.SpellStorage, args.Performer, Transform(args.Performer).Coordinates);
CastTelegraphy((args.Action, magicEffect), spellArgs);
@@ -93,7 +93,7 @@ public abstract partial class CP14SharedMagicSystem
RaiseLocalEvent(args.Action, ref evStart);
var spellArgs =
new CP14SpellEffectBaseArgs(args.Performer, args.Entity, args.Coords);
new CP14SpellEffectBaseArgs(args.Performer, magicEffect.SpellStorage, args.Entity, args.Coords);
CastTelegraphy((args.Action, magicEffect), spellArgs);
@@ -136,7 +136,7 @@ public abstract partial class CP14SharedMagicSystem
RaiseLocalEvent(args.Action, ref evStart);
var spellArgs =
new CP14SpellEffectBaseArgs(args.Performer, args.Target, Transform(args.Target).Coordinates);
new CP14SpellEffectBaseArgs(args.Performer, magicEffect.SpellStorage, args.Target, Transform(args.Target).Coordinates);
CastTelegraphy((args.Action, magicEffect), spellArgs);
@@ -158,7 +158,7 @@ public abstract partial class CP14SharedMagicSystem
if (args.Cancelled || args.Handled)
return;
CastSpell(ent, new CP14SpellEffectBaseArgs(args.User, args.User, Transform(args.User).Coordinates), args.Cooldown ?? 0);
CastSpell(ent, new CP14SpellEffectBaseArgs(args.User, args.Used, args.User, Transform(args.User).Coordinates), args.Cooldown ?? 0);
args.Handled = true;
}
@@ -178,7 +178,7 @@ public abstract partial class CP14SharedMagicSystem
var targetPos = EntityManager.GetCoordinates(args.TargetPosition);
EntityManager.TryGetEntity(args.TargetEntity, out var targetEnt);
CastSpell(ent, new CP14SpellEffectBaseArgs(args.User, targetEnt, targetPos), args.Cooldown ?? 0);
CastSpell(ent, new CP14SpellEffectBaseArgs(args.User, args.Used, targetEnt, targetPos), args.Cooldown ?? 0);
args.Handled = true;
}
@@ -198,7 +198,7 @@ public abstract partial class CP14SharedMagicSystem
EntityCoordinates? targetPos = null;
if (targetEnt is not null) { targetPos = Transform(targetEnt.Value).Coordinates; }
CastSpell(ent, new CP14SpellEffectBaseArgs(args.User, targetEnt, targetPos), args.Cooldown ?? 0);
CastSpell(ent, new CP14SpellEffectBaseArgs(args.User, args.Used, targetEnt, targetPos), args.Cooldown ?? 0);
args.Handled = true;
}

View File

@@ -0,0 +1,61 @@
using Content.Shared._CP14.MagicEnergy;
using Content.Shared._CP14.MagicEnergy.Components;
using Content.Shared.FixedPoint;
namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellConsumeManaEffect : CP14SpellEffect
{
[DataField]
public FixedPoint2 Mana = 0;
[DataField]
public bool Safe = false;
[DataField]
public float LossMultiplier = 0.8f;
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
if (args.Target is null)
return;
var targetEntity = args.Target.Value;
if (!entManager.TryGetComponent<CP14MagicEnergyContainerComponent>(targetEntity, out var magicContainer))
return;
var magicEnergy = entManager.System<SharedCP14MagicEnergySystem>();
var currentMana = magicContainer.Energy;
FixedPoint2 manaBuffer = MathF.Min(Mana.Float(), currentMana.Float()) * LossMultiplier;
if (!magicEnergy.TryConsumeEnergy(targetEntity, Mana, magicContainer, Safe))
return;
//OK, we consume mana (or health?) from target, and now we put it in used object or caster
//First - used object
if (manaBuffer > 0 && entManager.TryGetComponent<CP14MagicEnergyContainerComponent>(args.Used, out var usedMagicStorage))
{
var freeSpace = usedMagicStorage.MaxEnergy - usedMagicStorage.Energy;
if (freeSpace < manaBuffer)
{
magicEnergy.ChangeEnergy(args.Used.Value, usedMagicStorage, freeSpace, true);
manaBuffer -= freeSpace;
}
else
{
magicEnergy.ChangeEnergy(args.Used.Value, usedMagicStorage, manaBuffer, true);
manaBuffer = 0;
}
}
//Second - action user
if (manaBuffer > 0 && entManager.TryGetComponent<CP14MagicEnergyContainerComponent>(args.User, out var userMagicStorage))
{
magicEnergy.ChangeEnergy(args.User.Value, userMagicStorage, manaBuffer, Safe);
}
}
}

View File

@@ -13,12 +13,14 @@ public abstract partial class CP14SpellEffect
public record class CP14SpellEffectBaseArgs
{
public EntityUid? User;
public EntityUid? Used;
public EntityUid? Target;
public EntityCoordinates? Position;
public CP14SpellEffectBaseArgs(EntityUid? user, EntityUid? target, EntityCoordinates? position)
public CP14SpellEffectBaseArgs(EntityUid? user, EntityUid? used, EntityUid? target, EntityCoordinates? position)
{
User = user;
Used = used;
Target = target;
Position = position;
}

View File

@@ -10,6 +10,7 @@ cp14-loadout-general-shirt = Shirt
cp14-loadout-general-shoes = Shoes
cp14-loadout-general-back = Back
cp14-loadout-general-trinkets = Trinkets
cp14-loadout-general-spells = Spells
# Alchemist

View File

@@ -20,14 +20,6 @@ cp14-trait-muted-desc = All you can do is mumble incoherently. The benefits of v
cp14-trait-snoring-name = Loud snoring
cp14-trait-snoring-desc = It is simply impossible to sleep next to you because you snore terribly loudly at everything.
# Magic spells
cp14-trait-spell-flamecreation-name = flame creation
cp14-trait-spell-flamecreation-desc = A artificial flame forms in your hand, illuminating your surroundings. You can throw it to use it as a disposable weapon.
cp14-trait-spell-managift-name = mana gift
cp14-trait-spell-managift-desc = You can transfer a small amount of your magical energy to a target entity or magical object.
# Backgrounds
cp14-trait-bg-entertainer-name = Entertainer

View File

@@ -10,6 +10,7 @@ cp14-loadout-general-shirt = Рубашка
cp14-loadout-general-shoes = Обувь
cp14-loadout-general-back = Спина
cp14-loadout-general-trinkets = Безделушки
cp14-loadout-general-spells = Заклинания
# Alchemist

View File

@@ -20,14 +20,6 @@ cp14-trait-muted-desc = Все что вы можете - бессвязно м
cp14-trait-snoring-name = Громкий храп
cp14-trait-snoring-desc = Спать рядом с вами просто невозможно, потому что во все вы жутко громко храпите.
# Magic spells
cp14-trait-spell-flamecreation-name = создание пламени
cp14-trait-spell-flamecreation-desc = A artificial flame forms in your hand, illuminating your surroundings. You can throw it to use it as a disposable weapon.
cp14-trait-spell-managift-name = передача маны
cp14-trait-spell-managift-desc = You can transfer a small amount of your magical energy to a target entity or magical object.
# Backgrounds
cp14-trait-bg-entertainer-name = Артист

View File

@@ -44,9 +44,12 @@
children:
- !type:GroupSelector
children:
- id: CP14Scissors
- id: CP14BaseCrowbar
weight: 2
- id: CP14BaseWrench
weight: 2
- id: CP14Scissors
- id: CP14ManaOperationGlove
- id: CP14BaseShovel
- id: CP14BaseMop
- id: CP14BaseBroom

View File

@@ -3,6 +3,9 @@
name: Earth wall
description: Raises a solid wall of earth from the bowels.
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: earth_wall
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.3
- type: CP14MagicEffect

View File

@@ -3,6 +3,9 @@
name: Flame creation
description: A artificial flame forms in your hand, illuminating your surroundings. You can throw it to use it as a disposable weapon.
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: flame_creation
- type: CP14MagicEffect
magicType: Fire
manaCost: 5
@@ -73,7 +76,7 @@
- state: inhand-right
shader: unshaded
- type: TimedDespawn
lifetime: 300 # 5 min
lifetime: 60 # 1 min
- type: Sprite
sprite: _CP14/Objects/Misc/artificial_flame.rsi
layers:

View File

@@ -3,6 +3,9 @@
name: Fireball
description: An effective method of destruction - an explosive fireball
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: fireball
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.3
- type: CP14MagicEffect

View File

@@ -3,6 +3,9 @@
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/Effects/Magic/spells_icons.rsi
state: shadow_step
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.8
- type: CP14MagicEffect

View File

@@ -3,6 +3,9 @@
name: Cure wounds
description: You touch the creature, healing its body from physical damage
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: cure_wounds
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.5
- type: CP14MagicEffect

View File

@@ -3,6 +3,9 @@
name: Sphere of Light
description: Materialization of a bright and safe light source.
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: sphere_of_light
- type: CP14MagicEffect
magicType: LightDarkness
manaCost: 10
@@ -63,7 +66,7 @@
categories: [ ForkFiltered ]
components:
- type: TimedDespawn
lifetime: 300 # 5 min
lifetime: 180 # 3 min
- type: Sprite
sprite: _CP14/Effects/Magic/sphere_of_light.rsi
noRot: true
@@ -90,8 +93,8 @@
- type: LandAtCursor
- type: MovementIgnoreGravity
- type: PointLight
radius: 6.0
energy: 2
radius: 5.0
energy: 1
color: "#efedff"
- type: Damageable
- type: EmitSoundOnLand

View File

@@ -3,6 +3,9 @@
name: Flash Light
description: Creates a flash of bright, blinding light.
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: flash_light
- type: CP14MagicEffect
magicType: LightDarkness
manaCost: 10

View File

@@ -0,0 +1,67 @@
- type: entity
id: CP14ActionSpellManaConsume
name: Mana consume
description: You absorb a small amount of mana from the target.
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: mana_consume
- type: CP14MagicEffect
magicType: Meta
manaCost: 0
canModifyManacost: false
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectManaConsume
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectManaConsume
- !type:CP14SpellConsumeManaEffect
mana: 10
- type: CP14MagicEffectSomaticAspect
- type: CP14MagicEffectCastingVisual
proto: CP14RuneManaConsume
- type: EntityTargetAction
whitelist:
components:
- CP14MagicEnergyContainer
itemIconStyle: BigAction
interactOnMiss: false
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
icon:
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: mana_consume
event: !type:CP14DelayedEntityTargetActionEvent
cooldown: 1
castDelay: 2
breakOnMove: true
- type: entity
id: CP14RuneManaConsume
parent: CP14BaseMagicRune
categories: [ HideSpawnMenu ]
components:
- type: PointLight
color: "#5096d4"
- type: Sprite
layers:
- state: medium_line
color: "#5096d4"
shader: unshaded
- state: double_outer
color: "#5096d4"
shader: unshaded
- type: entity
id: CP14ImpactEffectManaConsume
parent: CP14BaseMagicImpact
categories: [ HideSpawnMenu ]
components:
- type: Sprite
layers:
- state: particles_down
color: "#5096d4"
shader: unshaded

View File

@@ -3,6 +3,9 @@
name: Mana transfer
description: You can transfer a small amount of your magical energy to a target entity or magical object.
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: mana_gift
- type: CP14MagicEffect
magicType: Meta
manaCost: 12
@@ -20,9 +23,6 @@
- !type:CP14ManaChange
manaDelta: 10
safe: false
- type: CP14MagicEffectVerbalAspect
startSpeech: "Energia..."
endSpeech: "te reficit"
- type: CP14MagicEffectSomaticAspect
- type: CP14MagicEffectCastingVisual
proto: CP14RuneManaGift

View File

@@ -3,6 +3,9 @@
name: Shadow grab
description: You attract a ghostly hand that draws an object or entity to you
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: shadow_grab
- type: CP14MagicEffect
magicType: Movement
manaCost: 10

View File

@@ -3,6 +3,9 @@
name: Resurrection
description: You're trying to put the soul back into the body.
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: resurrection
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.2
- type: CP14MagicEffect

View File

@@ -3,6 +3,9 @@
name: Ice dagger
description: Materialization of a temporary sharp ice throwing dagger
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: ice_dagger
- type: CP14MagicEffect
magicType: Water
manaCost: 15

View File

@@ -0,0 +1,147 @@
- type: entity
id: CP14ActionSpellWaterCreation
name: Water creation
description: Creating a clot of water that is held in a floating balloon shape for some time
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: water_creation
- type: CP14MagicEffect
magicType: Water
manaCost: 10
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectWaterCreation
- !type:CP14SpellSpawnInHandEntity
spawns:
- CP14LiquidDropWater
- type: CP14MagicEffectSomaticAspect
- type: CP14MagicEffectCastingVisual
proto: CP14RuneWaterCreation
- type: InstantAction
itemIconStyle: BigAction
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
icon:
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: water_creation
event: !type:CP14DelayedInstantActionEvent
cooldown: 10
castDelay: 0.8
breakOnMove: false
- type: entity
id: CP14RuneWaterCreation
parent: CP14BaseMagicRune
categories: [ HideSpawnMenu ]
components:
- type: PointLight
color: "#5eabeb"
- type: Sprite
layers:
- state: medium_line
color: "#5eabeb"
shader: unshaded
- type: entity
id: CP14LiquidDropWater
parent: BaseItem
name: floating liquid drop
description: A clot of liquid held in the shape of a ball by magic
categories: [ ForkFiltered ]
components:
- type: Item
size: Ginormous
- type: BadFood
- type: SolutionContainerManager
solutions:
drop:
maxVol: 10
reagents:
- ReagentId: Water
Quantity: 10
- type: CP14MeleeSelfDamage
damageToSelf:
types:
Blunt: 1 # 1 hits
- type: LandAtCursor
- type: DamageOnHighSpeedImpact
minimumSpeed: 0.1
damage:
types:
Blunt: 1
- type: MeleeWeapon
attackRate: 1.8
wideAnimationRotation: 225
wideAnimation: CP14WeaponArcSlash
damage:
types:
Blunt: 0
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 1
behaviors:
- !type:PlaySoundBehavior
sound:
collection: desecration
- !type:SpillBehavior
solution: drop
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: PassiveDamage # Around 8 damage a minute healed
damage:
groups:
Brute: 0.016 # ~ 1 minute
- type: Damageable
damageContainer: Biological
- type: Food
solution: drop
useSound: /Audio/Items/drink.ogg
eatMessage: drink-component-try-use-drink-success-slurp
delay: 0.5
forceFeedDelay: 1.5
- type: ExaminableSolution
solution: drop
- type: RefillableSolution
solution: drop
- type: InjectableSolution
solution: drop
- type: FitsInDispenser
solution: drop
- type: MixableSolution
solution: drop
- type: CP14SolutionTemperature
- type: Appearance
- type: Sprite
sprite: _CP14/Objects/Misc/liquid_drop.rsi
layers:
- state: liq-1
map: ["enum.SolutionContainerLayers.Fill"]
- type: SolutionContainerVisuals
maxFillLevels: 1
fillBaseName: liq-
inHandsMaxFillLevels: 1
inHandsFillBaseName: -fill
- type: entity
id: CP14ImpactEffectWaterCreation
parent: CP14BaseMagicImpact
categories: [ HideSpawnMenu ]
components:
- type: Sprite
layers:
- state: particles_up
color: "#5eabeb"
shader: unshaded
- type: entity
parent: CP14BaseSpellScrollWater
id: CP14SpellScrollWaterCreation
name: water creation spell scroll
components:
- type: CP14SpellStorage
spells:
- CP14ActionSpellWaterCreation

View File

@@ -0,0 +1,87 @@
- type: entity
id: CP14ActionSpellBeerCreation
name: Beer creation
description: A secret spell that materializes beer from pure mana.
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: beer_creation
- type: CP14MagicEffect
magicType: Water
manaCost: 50
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectBeerCreation
- !type:CP14SpellSpawnInHandEntity
spawns:
- CP14LiquidDropBeer
- type: CP14MagicEffectVerbalAspect
startSpeech: "beer..."
endSpeech: "Arriva la birra"
- type: CP14MagicEffectSomaticAspect
- type: CP14MagicEffectCastingVisual
proto: CP14RuneBeerCreation
- type: InstantAction
itemIconStyle: BigAction
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
icon:
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: beer_creation
event: !type:CP14DelayedInstantActionEvent
cooldown: 60
castDelay: 5
breakOnMove: true
- type: entity
id: CP14RuneBeerCreation
parent: CP14BaseMagicRune
categories: [ HideSpawnMenu ]
components:
- type: PointLight
color: "#5eabeb"
- type: Sprite
layers:
- state: medium_line
color: "#9e522c"
shader: unshaded
- state: medium_circle
color: "#5eabeb"
shader: unshaded
- type: entity
id: CP14LiquidDropBeer
parent: CP14LiquidDropWater
categories: [ ForkFiltered ]
components:
- type: SolutionContainerManager
solutions:
drop:
maxVol: 10
reagents:
- ReagentId: Beer
Quantity: 10
- type: entity
id: CP14ImpactEffectBeerCreation
parent: CP14BaseMagicImpact
categories: [ HideSpawnMenu ]
components:
- type: Sprite
layers:
- state: particles_up
color: "#5eabeb"
shader: unshaded
- state: particles_down
color: "#9e522c"
shader: unshaded
- type: entity
parent: CP14BaseSpellScrollWater
id: CP14SpellScrollBeerCreation
name: beer creation spell scroll
components:
- type: CP14SpellStorage
spells:
- CP14ActionSpellBeerCreation

View File

@@ -3,6 +3,9 @@
name: Ice Shards
description: Fast ice needles, for rapid shooting of targets.
components:
- type: Sprite
sprite: _CP14/Effects/Magic/spells_icons.rsi
state: ice_shards
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.75
- type: CP14MagicEffect

View File

@@ -12,38 +12,6 @@
- type: Sprite
sprite: _CP14/Clothing/Rings/rings.rsi
- type: entity
id: CP14ClothingRingIceDagger
parent: CP14ClothingRingBase
name: ice dagger conductive ring
suffix: Ice Dagger
description: A standard mana-conductive ring that allows the user to summon ice daggers.
components:
- type: Sprite
layers:
- state: brass_ring
- state: saphhire_stone_small
- type: CP14SpellStorageAccessWearing
- type: CP14SpellStorage
spells:
- CP14ActionSpellIceDagger
- type: entity
id: CP14ClothingRingManaGift
parent: CP14ClothingRingBase
name: mana transfering conductive ring
suffix: Mana gift
description: A standard mana-conductive ring that allows you to transfer some of your magical energy to other objects.
components:
- type: Sprite
layers:
- state: brass_ring
- state: saphhire_stone_small
- type: CP14SpellStorageAccessWearing
- type: CP14SpellStorage
spells:
- CP14ActionSpellManaGift
- type: entity
id: CP14ClothingRingIceShards
parent: CP14ClothingRingBase
@@ -60,22 +28,6 @@
spells:
- CP14ActionSpellIceShards
- type: entity
id: CP14ClothingRingFlameCreation
parent: CP14ClothingRingBase
name: flame creation conductive ring
description: A standard mana-conductive ring that allows the user to summon artificial flames.
suffix: Flame creation
components:
- type: Sprite
layers:
- state: brass_ring
- state: ruby_stone_small
- type: CP14SpellStorageAccessWearing
- type: CP14SpellStorage
spells:
- CP14ActionSpellFlameCreation
- type: entity
id: CP14ClothingRingFireball
parent: CP14ClothingRingBase
@@ -92,54 +44,6 @@
spells:
- CP14ActionSpellFireball
- type: entity
id: CP14ClothingRingShadowGrab
parent: CP14ClothingRingBase
name: shadow grab conductive ring
description: A standard mana-conductive ring that allows the user to summon grabbing shadow hand.
suffix: Shadow grab
components:
- type: Sprite
layers:
- state: brass_ring
- state: amethyst_stone_small
- type: CP14SpellStorageAccessWearing
- type: CP14SpellStorage
spells:
- CP14ActionSpellShadowGrab
- type: entity
id: CP14ClothingRingEarthWall
parent: CP14ClothingRingBase
name: earth wall conductive ring
description: A standard mana-conductive ring that allows you to lift a piece of earth rock.
suffix: Earth wall
components:
- type: Sprite
layers:
- state: brass_ring
- state: berill_stone_small
- type: CP14SpellStorageAccessWearing
- type: CP14SpellStorage
spells:
- CP14ActionSpellEarthWall
- type: entity
id: CP14ClothingRingSphereOfLight
parent: CP14ClothingRingBase
name: light sphere conductive ring
description: A standard mana-conductive ring that allows the user to create a sphere of light.
suffix: Sphere of Light
components:
- type: Sprite
layers:
- state: brass_ring
- state: citrine_stone_small
- type: CP14SpellStorageAccessWearing
- type: CP14SpellStorage
spells:
- CP14ActionSpellSphereOfLight
- type: entity
id: CP14ClothingRingFlashLight
parent: CP14ClothingRingBase

View File

@@ -45,6 +45,8 @@
- id: CP14SpellScrollFlameCreation
- id: CP14SpellScrollEarthWall
- id: CP14SpellScrollFlashLight
- id: CP14SpellScrollWaterCreation
- id: CP14SpellScrollBeerCreation
- id: CP14EnergyCrystalSmall
- id: CP14BaseSharpeningStone
- id: CP14GlassShard
@@ -75,16 +77,10 @@
# remove this when players can create their own magic items
- !type:GroupSelector
children:
- id: CP14ClothingRingIceDagger
- id: CP14ClothingRingIceShards
- id: CP14ClothingRingFlameCreation
- id: CP14ClothingRingFireball
- id: CP14MagicHealingStaff
- id: CP14ClothingRingShadowGrab
- id: CP14ClothingRingEarthWall
- id: CP14ClothingRingManaGift
- id: CP14ClothingRingSphereOfLight
- id: CP14ClothingRingFlashLight
- id: CP14MagicHealingStaff
- id: CP14SpellScrollResurrection
# Rare standard village crates loot
- !type:NestedSelector

View File

@@ -30,4 +30,49 @@
sprite: _CP14/Objects/Specific/Thaumaturgy/ritual_chalk.rsi
state: icon
- type: Item
sprite: _CP14/Objects/Specific/Thaumaturgy/ritual_chalk.rsi
sprite: _CP14/Objects/Specific/Thaumaturgy/ritual_chalk.rsi
- type: entity
id: CP14ManaOperationGlove
parent:
- BaseItem
- CP14BaseWeaponLight
- CP14BaseWeaponShort
name: mana glove
description: "An unsophisticated but aesthetically pleasing blend of technology and magic crystals that allows you to operate with raw mana: siphoning it from some objects and pumping it into others."
categories: [ ForkFiltered ]
components:
- type: Sprite
sprite: _CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi
state: icon
- type: Item
size: Normal
shape:
- 0,0,0,1
storedRotation: -45
sprite: _CP14/Objects/Specific/Thaumaturgy/powerline_gauntlet.rsi
- type: CP14MagicEnergyContainer
magicAlert: CP14MagicEnergy
maxEnergy: 50
energy: 0
- type: CP14MagicEnergyExaminable
- type: CP14SpellStorageAccessHolding
- type: CP14SpellStorage
spells:
- CP14ActionSpellManaGift
- CP14ActionSpellManaConsume
- type: ThrowingAngle #Fun
angle: 225
- type: MeleeWeapon
angle: 0
attackRate: 1.2
range: 1.2
wideAnimationRotation: 225
wideAnimation: CP14WeaponArcThrust
damage:
types:
Blunt: 5
soundHit:
collection: MetalThud
cPAnimationLength: 0.25
cPAnimationOffset: -1.3

View File

@@ -24,7 +24,7 @@
- type: IncreaseDamageOnWield
damage:
types:
Blunt: 3
Blunt: 4
- type: MeleeWeapon
angle: 100
attackRate: 1.3
@@ -33,7 +33,7 @@
wideAnimation: CP14WeaponArcSlash
damage:
types:
Blunt: 2
Blunt: 4
soundHit:
collection: MetalThud
cPAnimationLength: 0.3

View File

@@ -291,7 +291,7 @@
maxLimit: 2
loadouts:
- CP14MagicHealingStaff
- CP14ClothingRingManaGift
- CP14ManaOperationGlove
- CP14EnergyCrystalSmall
- CP14CrystalLampOrangeEmpty
- CP14BaseSharpeningStone
@@ -307,15 +307,14 @@
- type: loadout
id: CP14MagicHealingStaff
storage:
neck:
- CP14MagicHealingStaff
inhand:
- CP14MagicHealingStaff
- type: loadout
id: CP14ClothingRingManaGift
id: CP14ManaOperationGlove
storage:
back:
- CP14ClothingRingManaGift
- CP14ManaOperationGlove
- type: loadout
id: CP14EnergyCrystalSmall
@@ -387,4 +386,87 @@
id: CP14BasePickaxe
storage:
back:
- CP14BasePickaxe
- CP14BasePickaxe
# Spells
- type: loadoutGroup
id: CP14GeneralSpells
name: cp14-loadout-general-spells
minLimit: 0
maxLimit: 2
loadouts:
- CP14ActionSpellFlameCreation
- CP14ActionSpellCureWounds
- CP14ActionSpellSphereOfLight
- CP14ActionSpellManaConsume
- CP14ActionSpellManaGift
- CP14ActionSpellShadowGrab
- CP14ActionSpellIceDagger
- CP14ActionSpellWaterCreation
- CP14ActionSpellBeerCreation
- type: loadout
id: CP14ActionSpellFlameCreation
dummyEntity: CP14ActionSpellFlameCreation
actions:
- CP14ActionSpellFlameCreation
- type: loadout
id: CP14ActionSpellCureWounds
dummyEntity: CP14ActionSpellCureWounds
actions:
- CP14ActionSpellCureWounds
- type: loadout
id: CP14ActionSpellSphereOfLight
dummyEntity: CP14ActionSpellSphereOfLight
actions:
- CP14ActionSpellSphereOfLight
- type: loadout
id: CP14ActionSpellManaConsume
dummyEntity: CP14ActionSpellManaConsume
actions:
- CP14ActionSpellManaConsume
- type: loadout
id: CP14ActionSpellManaGift
dummyEntity: CP14ActionSpellManaGift
actions:
- CP14ActionSpellManaGift
- type: loadout
id: CP14ActionSpellShadowGrab
dummyEntity: CP14ActionSpellShadowGrab
actions:
- CP14ActionSpellShadowGrab
- type: loadout
id: CP14ActionSpellIceDagger
dummyEntity: CP14ActionSpellIceDagger
actions:
- CP14ActionSpellIceDagger
- type: loadout
id: CP14ActionSpellWaterCreation
dummyEntity: CP14ActionSpellWaterCreation
actions:
- CP14ActionSpellWaterCreation
- type: loadout
id: CP14ActionSpellBeerCreation
dummyEntity: CP14ActionSpellBeerCreation
actions:
- CP14ActionSpellBeerCreation
effects:
- !type:JobRequirementLoadoutEffect
requirement:
!type:SpeciesRequirement
species:
- CP14Dwarf
- !type:JobRequirementLoadoutEffect
requirement:
!type:RoleTimeRequirement
role: CP14JobInnkeeper
time: 7200 # 2 hour

View File

@@ -1,6 +1,7 @@
- type: roleLoadout
id: JobCP14Adventurer
groups:
- CP14GeneralSpells
- CP14GeneralHead
- CP14GeneralEyes
- CP14GeneralMask
@@ -15,6 +16,7 @@
- type: roleLoadout
id: JobCP14Alchemist
groups:
- CP14GeneralSpells
- CP14AlchemistHead #
- CP14AlchemistEyes #
- CP14GeneralMask
@@ -29,6 +31,7 @@
- type: roleLoadout
id: JobCP14Innkeeper
groups:
- CP14GeneralSpells
- CP14GeneralHead
- CP14GeneralEyes
- CP14GeneralMask
@@ -43,6 +46,7 @@
- type: roleLoadout
id: JobCP14Blacksmith
groups:
- CP14GeneralSpells
- CP14GeneralHead
- CP14GeneralEyes
- CP14GeneralMask
@@ -57,6 +61,7 @@
- type: roleLoadout
id: JobCP14Captain
groups:
- CP14GeneralSpells
- CP14CaptainHead #
- CP14GeneralEyes
- CP14GeneralMask
@@ -71,6 +76,7 @@
- type: roleLoadout
id: JobCP14GuardCommander
groups:
- CP14GeneralSpells
- CP14GeneralHead
- CP14GeneralEyes
- CP14GeneralMask
@@ -85,6 +91,7 @@
- type: roleLoadout
id: JobCP14Commandant
groups:
- CP14GeneralSpells
- CP14CommandantHead
- CP14GeneralEyes
- CP14CommandantCloak
@@ -97,6 +104,7 @@
- type: roleLoadout
id: JobCP14Banker
groups:
- CP14GeneralSpells
- CP14BankHead
- CP14GeneralEyes
- CP14BankShirt

View File

@@ -1,8 +1,3 @@
- type: traitCategory
id: CP14Magic
name: cp14-trait-category-magic
maxTraitPoints: 1
- type: traitCategory
id: CP14PhysicalTraits
name: cp14-trait-category-physical

View File

@@ -1,17 +0,0 @@
- type: trait
id: CP14MagicFlameCreation
name: cp14-trait-spell-flamecreation-name
description: cp14-trait-spell-flamecreation-desc
cost: 1
category: CP14Magic
actions:
- CP14ActionSpellFlameCreation
- type: trait
id: CP14MagicManaGift
name: cp14-trait-spell-managift-name
description: cp14-trait-spell-managift-desc
cost: 1
category: CP14Magic
actions:
- CP14ActionSpellManaGift

View File

@@ -7,6 +7,21 @@
"license": "CLA",
"copyright": "Created by TheShuEd",
"states": [
{
"name": "particles_down",
"delays": [
[
0.2,
0.2,
0.2,
0.2,
0.2,
0.2,
0.2,
0.2
]
]
},
{
"name": "particles_up",
"delays": [

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 B

After

Width:  |  Height:  |  Size: 468 B

View File

@@ -7,6 +7,9 @@
"license": "CLA",
"copyright": "Created by .kreks., mana_gift and resurrection by TheShuEd",
"states": [
{
"name": "beer_creation"
},
{
"name": "cure_wounds"
},
@@ -28,6 +31,9 @@
{
"name": "ice_shards"
},
{
"name": "mana_consume"
},
{
"name": "mana_gift"
},
@@ -42,6 +48,9 @@
},
{
"name": "sphere_of_light"
},
{
"name": "water_creation"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

View File

@@ -0,0 +1,82 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CLA",
"copyright": "Created by TheShuEd",
"states": [
{
"name": "liq-1",
"delays": [
[
0.2,
0.2,
0.2,
0.2
]
]
},
{
"name": "inhand-left-fill1",
"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": "inhand-right-fill1",
"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
]
]
}
]
}

View File

@@ -122,11 +122,11 @@ CP14FlowersYellow: CP14Dayflin
#2024-11-03
CP14OldLantern: CP14CrystalLampBlueEmpty
CP14ClothingRingIceFloor: CP14ClothingRingManaGift
CP14ClothingRingIceFloor: CP14ManaOperationGlove
#2024-11-05
CP14ClothingRingCureWounds: CP14MagicHealingStaff
CP14ClothingRingShadowStep: CP14ClothingRingManaGift
CP14ClothingRingShadowStep: null
#2024-11-11
CP14BlueVial: CP14BlueBottle
@@ -146,6 +146,14 @@ CP14KeyBankSafe4: CP14KeyBankSafe
CP14KeyBankSafe5: CP14KeyBankSafe
CP14KeyBankSafe6: CP14KeyBankSafe
#2024-19-11
CP14ClothingRingManaGift: CP14ManaOperationGlove
CP14ClothingRingIceDagger: CP14ManaOperationGlove
CP14ClothingRingFlameCreation: null
CP14ClothingRingShadowGrab: null
CP14ClothingRingEarthWall: null
CP14ClothingRingSphereOfLight: null
# <---> CrystallEdge migration zone end