Tiefling gameplay (#703)
* tiefling damage mana * tiefling spell * tweaks
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Content.Server._CP14.MagicEnergy.Components;
|
||||
using Content.Shared._CP14.DayCycle;
|
||||
using Content.Shared._CP14.MagicEnergy.Components;
|
||||
using Content.Shared.Damage;
|
||||
|
||||
namespace Content.Server._CP14.MagicEnergy;
|
||||
|
||||
@@ -11,6 +12,24 @@ public partial class CP14MagicEnergySystem
|
||||
private void InitializeDraw()
|
||||
{
|
||||
SubscribeLocalEvent<CP14MagicEnergyDrawComponent, MapInitEvent>(OnDrawMapInit);
|
||||
SubscribeLocalEvent<CP14MagicEnergyFromDamageComponent, DamageChangedEvent>(OnDamageChanged);
|
||||
}
|
||||
|
||||
private void OnDamageChanged(Entity<CP14MagicEnergyFromDamageComponent> ent, ref DamageChangedEvent args)
|
||||
{
|
||||
if (args.DamageDelta is null || !args.DamageIncreased)
|
||||
return;
|
||||
|
||||
foreach (var dict in args.DamageDelta.DamageDict)
|
||||
{
|
||||
if (dict.Value <= 0)
|
||||
continue;
|
||||
|
||||
if (!ent.Comp.Damage.TryGetValue(dict.Key, out var modifier))
|
||||
continue;
|
||||
|
||||
ChangeEnergy(ent, modifier * dict.Value, true);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDrawMapInit(Entity<CP14MagicEnergyDrawComponent> ent, ref MapInitEvent args)
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System.Numerics;
|
||||
using Content.Server._CP14.MagicEnergy.Components;
|
||||
using Content.Shared._CP14.MagicEnergy;
|
||||
using Content.Shared._CP14.MagicEnergy.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Inventory;
|
||||
|
||||
namespace Content.Server._CP14.MagicEnergy;
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared._CP14.MagicEnergy;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server._CP14.MagicEnergy;
|
||||
|
||||
public sealed partial class CP14MagicEnergySystem : SharedCP14MagicEnergySystem
|
||||
{
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly CP14MagicEnergyCrystalSlotSystem _magicSlot = default!;
|
||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly PopupSystem _popup = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using Content.Shared.Damage.Prototypes;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared._CP14.MagicEnergy.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Restores or expends magical energy when taking damage of certain types.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(SharedCP14MagicEnergySystem))]
|
||||
public sealed partial class CP14MagicEnergyFromDamageComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public Dictionary<ProtoId<DamageTypePrototype>, float> Damage = new();
|
||||
}
|
||||
@@ -14,8 +14,9 @@ public sealed partial class CP14MagicUnsafeDamageComponent : Component
|
||||
{
|
||||
DamageDict = new Dictionary<string, FixedPoint2>
|
||||
{
|
||||
{"Blunt", 0.5},
|
||||
{"Heat", 0.5},
|
||||
{"Blunt", 0.3},
|
||||
{"Poison", 0.4},
|
||||
{"Heat", 0.3},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
abstract: true
|
||||
components:
|
||||
- type: Flammable
|
||||
fireSpread: true
|
||||
fireSpread: false #CP14 false
|
||||
canResistFire: true
|
||||
damage: #per second, scales with number of fire 'stacks'
|
||||
types:
|
||||
|
||||
@@ -45,3 +45,11 @@
|
||||
Heat: 1.3
|
||||
Cold: 0.8
|
||||
Poison: 0.2
|
||||
|
||||
# Species
|
||||
|
||||
- type: damageModifierSet
|
||||
id: CP14Tiefling
|
||||
coefficients:
|
||||
Heat: 0.5
|
||||
Cold: 1.5
|
||||
@@ -0,0 +1,64 @@
|
||||
- type: entity
|
||||
id: CP14ActionSpellTieflingInnerFire
|
||||
name: Inner fire
|
||||
description: You unleash your inner fire, setting yourself on fire and temporarily speeding up your movement.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: _CP14/Effects/Magic/spells_icons.rsi
|
||||
state: tiefling_revenge
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 0.5
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RuneTieflingRevenge
|
||||
- type: CP14MagicEffect
|
||||
magicType: Fire
|
||||
effects:
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
- CP14ImpactEffectTieflingRevenge
|
||||
- !type:CP14SpellApplyEntityEffect
|
||||
effects:
|
||||
- !type:Jitter
|
||||
- !type:FlammableReaction
|
||||
multiplier: 1.5
|
||||
- !type:AdjustTemperature
|
||||
amount: 6000
|
||||
- !type:Ignite
|
||||
- !type:MovespeedModifier
|
||||
walkSpeedModifier: 1.2
|
||||
sprintSpeedModifier: 1.2
|
||||
statusLifetime: 5
|
||||
- type: InstantAction
|
||||
itemIconStyle: BigAction
|
||||
sound: !type:SoundPathSpecifier
|
||||
path: /Audio/Magic/rumble.ogg
|
||||
icon:
|
||||
sprite: _CP14/Effects/Magic/spells_icons.rsi
|
||||
state: tiefling_revenge
|
||||
event: !type:CP14DelayedInstantActionEvent
|
||||
cooldown: 10
|
||||
breakOnMove: false
|
||||
|
||||
- type: entity
|
||||
id: CP14ImpactEffectTieflingRevenge
|
||||
parent: CP14BaseMagicImpact
|
||||
categories: [ HideSpawnMenu ]
|
||||
components:
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: wave_up
|
||||
color: "#eea911"
|
||||
shader: unshaded
|
||||
|
||||
- type: entity
|
||||
id: CP14RuneTieflingRevenge
|
||||
parent: CP14BaseMagicRune
|
||||
categories: [ HideSpawnMenu ]
|
||||
components:
|
||||
- type: PointLight
|
||||
color: "#eea911"
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: sun
|
||||
color: "#eea911"
|
||||
shader: unshaded
|
||||
@@ -63,7 +63,7 @@
|
||||
sprite: _CP14/Effects/Magic/spells_icons.rsi
|
||||
state: plant_growth
|
||||
event: !type:CP14ToggleableEntityTargetActionEvent
|
||||
cooldown: 15
|
||||
cooldown: 2
|
||||
castTime: 10
|
||||
breakOnMove: true
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
sprite: _CP14/Effects/Magic/spells_icons.rsi
|
||||
state: mana_gift
|
||||
event: !type:CP14ToggleableEntityTargetActionEvent
|
||||
cooldown: 5
|
||||
cooldown: 2
|
||||
castTime: 10
|
||||
breakOnMove: true
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
sprite: _CP14/Effects/Magic/spells_icons.rsi
|
||||
state: sprint
|
||||
- type: CP14MagicEffectCastSlowdown
|
||||
speedMultiplier: 1.6
|
||||
speedMultiplier: 1.4
|
||||
- type: CP14MagicEffectStaminaCost
|
||||
stamina: 3
|
||||
- type: CP14MagicEffect
|
||||
@@ -24,6 +24,6 @@
|
||||
state: sprint
|
||||
event: !type:CP14ToggleableInstantActionEvent
|
||||
effectFrequency: 0.2
|
||||
cooldown: 10
|
||||
cooldown: 2
|
||||
castTime: 10
|
||||
hidden: true
|
||||
@@ -22,6 +22,32 @@
|
||||
- type: Wagging
|
||||
- type: Bloodstream
|
||||
bloodReagent: CP14BloodTiefling
|
||||
- type: Damageable
|
||||
damageContainer: Biological
|
||||
damageModifierSet: CP14Tiefling
|
||||
- type: PassiveDamage
|
||||
damageCap: 65
|
||||
allowedStates:
|
||||
- Alive
|
||||
- Critical
|
||||
damage:
|
||||
types:
|
||||
Heat: -0.14 # Around 8 damage a minute healed
|
||||
- type: CP14MagicEnergyDraw
|
||||
energy: 0.75
|
||||
delay: 3 # 5m to full restore
|
||||
- type: CP14MagicEnergyFromDamage
|
||||
damage:
|
||||
Heat: 1 #Magic regen from fire
|
||||
Cold: -1
|
||||
- type: CP14MagicManacostModify
|
||||
globalModifier: 1.2
|
||||
modifiers:
|
||||
Fire: 0.5
|
||||
- type: CP14SpellStorage
|
||||
grantAccessToSelf: true
|
||||
spells:
|
||||
- CP14ActionSpellTieflingInnerFire
|
||||
- type: Inventory
|
||||
templateId: CP14Human
|
||||
femaleDisplacements:
|
||||
|
||||
@@ -4,8 +4,17 @@
|
||||
name: Playable species
|
||||
text: "/ServerInfo/_CP14/Guidebook_EN/Species.xml"
|
||||
children:
|
||||
- CP14_EN_Elf
|
||||
- CP14_EN_Human
|
||||
- CP14_EN_Silva
|
||||
- CP14_EN_Elf
|
||||
- CP14_EN_Tiefling
|
||||
filterEnabled: True
|
||||
|
||||
- type: guideEntry
|
||||
crystallPunkAllowed: true
|
||||
id: CP14_EN_Human
|
||||
name: Human
|
||||
text: "/ServerInfo/_CP14/Guidebook_EN/SpeciesTabs/Human.xml"
|
||||
filterEnabled: True
|
||||
|
||||
- type: guideEntry
|
||||
@@ -20,4 +29,11 @@
|
||||
id: CP14_EN_Elf
|
||||
name: Elf
|
||||
text: "/ServerInfo/_CP14/Guidebook_EN/SpeciesTabs/Elf.xml"
|
||||
filterEnabled: True
|
||||
|
||||
- type: guideEntry
|
||||
crystallPunkAllowed: true
|
||||
id: CP14_EN_Tiefling
|
||||
name: Tiefling
|
||||
text: "/ServerInfo/_CP14/Guidebook_EN/SpeciesTabs/Tiefling.xml"
|
||||
filterEnabled: True
|
||||
@@ -4,8 +4,17 @@
|
||||
name: Играбельные расы
|
||||
text: "/ServerInfo/_CP14/Guidebook_RU/Species.xml"
|
||||
children:
|
||||
- CP14_RU_Elf
|
||||
- CP14_RU_Human
|
||||
- CP14_RU_Silva
|
||||
- CP14_RU_Elf
|
||||
- CP14_RU_Tiefling
|
||||
filterEnabled: True
|
||||
|
||||
- type: guideEntry
|
||||
crystallPunkAllowed: true
|
||||
id: CP14_RU_Human
|
||||
name: Человек
|
||||
text: "/ServerInfo/_CP14/Guidebook_RU/SpeciesTabs/Human.xml"
|
||||
filterEnabled: True
|
||||
|
||||
- type: guideEntry
|
||||
@@ -20,4 +29,11 @@
|
||||
id: CP14_RU_Elf
|
||||
name: Эльф
|
||||
text: "/ServerInfo/_CP14/Guidebook_RU/SpeciesTabs/Elf.xml"
|
||||
filterEnabled: True
|
||||
|
||||
- type: guideEntry
|
||||
crystallPunkAllowed: true
|
||||
id: CP14_RU_Tiefling
|
||||
name: Тифлинг
|
||||
text: "/ServerInfo/_CP14/Guidebook_RU/SpeciesTabs/Tiefling.xml"
|
||||
filterEnabled: True
|
||||
@@ -5,7 +5,7 @@
|
||||
<GuideEntityEmbed Entity="CP14MobElf" Caption="Elf"/>
|
||||
</Box>
|
||||
|
||||
There will be a lore description
|
||||
Elves are a race very similar to humans, but have no common ancestors. They can be found in any corner of Sileitha, but most often living near forests or reserves.
|
||||
|
||||
## Ancient Magic
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<Document>
|
||||
# Humans
|
||||
|
||||
<Box>
|
||||
<GuideEntityEmbed Entity="CP14MobHuman" Caption="Human"/>
|
||||
</Box>
|
||||
|
||||
Humans - One of the youngest races culturally. Humans stand out for their commonness while being one of the dominant races in numbers.
|
||||
|
||||
## Gold Standard
|
||||
|
||||
Humans have no outstanding traits in any one area, but they don't have any weaknesses either. If you are new to the game, this is a great starting point to familiarise yourself with the basic mechanics.
|
||||
|
||||
</Document>
|
||||
@@ -0,0 +1,25 @@
|
||||
<Document>
|
||||
# Tieflings
|
||||
|
||||
<Box>
|
||||
<GuideEntityEmbed Entity="CP14MobTiefling" Caption="Tiefling"/>
|
||||
</Box>
|
||||
|
||||
The Tieflings are a race of humanoid demonoids that left the Fire Archipelago long ago. They are heavily populated throughout Sylate and have integrated themselves into the culture of all lands.
|
||||
|
||||
# Link with Fire
|
||||
|
||||
- Tieflings take 2x less damage from fire, but 2x more damage from cold.
|
||||
- Basic mana regeneration is slightly impaired, but taking fire damage greatly speeds up mana regeneration, while frostbite on the contrary causes mana drain.
|
||||
- Tieflings can slowly regenerate damage from fire burns, up to a certain limit.
|
||||
- Fire spells spend 40% less mana, but all other types spend 20% more mana
|
||||
|
||||
# Inner Flame
|
||||
|
||||
Tieflings have a special innate ability called Inner Flame. This ability sets the caster on fire, and temporarily speeds him up.
|
||||
|
||||
<Box>
|
||||
<GuideEntityEmbed Entity="CP14ActionSpellTieflingInnerFire"/>
|
||||
</Box>
|
||||
|
||||
</Document>
|
||||
@@ -5,7 +5,7 @@
|
||||
<GuideEntityEmbed Entity="CP14MobElf" Caption="Эльф"/>
|
||||
</Box>
|
||||
|
||||
Тут будет лорное описание
|
||||
Эльфы - раса очень сильно похожая на людей однако не имеющая общих предков. Можно встретить в любом уголке Силейты но чаще всего проживают у лесов или заповедников.
|
||||
|
||||
## Древняя магия
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<Document>
|
||||
# Люди
|
||||
|
||||
<Box>
|
||||
<GuideEntityEmbed Entity="CP14MobHuman" Caption="Человек"/>
|
||||
</Box>
|
||||
|
||||
Люди - Одна из самых молодых рас в культурном аспекте. Люди выделяются своей обыкновенностью при этом являясь одной из доминирующей рас в численности.
|
||||
|
||||
## Золотой стандарт
|
||||
|
||||
Люди не имеют выдающихся черт ни в одной из областей, но и не имеют никаких слабостей. Если вы новичек в игре - это отличная стартовая точка, чтобы ознакомиться с базовыми механиками.
|
||||
|
||||
</Document>
|
||||
@@ -0,0 +1,25 @@
|
||||
<Document>
|
||||
# Тифлинги
|
||||
|
||||
<Box>
|
||||
<GuideEntityEmbed Entity="CP14MobTiefling" Caption="Тифлинг"/>
|
||||
</Box>
|
||||
|
||||
Тифлинги - раса гуманоидных демонидов давно покинувшие архипелаг Огня. Сильно расселены по всей Силейте и интегрировались в культуру всех стран.
|
||||
|
||||
# Связь с огнем
|
||||
|
||||
- Тифлинги получают в 2 раза меньше урона от огня, но в 2 раза больше урона от холода.
|
||||
- Базовая регенерация маны слегка ослаблена, но получение урона огнем значительно ускоряет ее восстановление, в то время как обморожение наоборот, вызывает ее утечку.
|
||||
- Тифлинги могут медленно регенерировать урон от огненных ожогов, до определенного предела.
|
||||
- Огненные заклинания тратят на 40% меньше маны, но все остальные типы на 20% больше
|
||||
|
||||
# Внутреннее пламя
|
||||
|
||||
Тифлинги имеют особую врожденную способность "Внутреннее пламя". Эта способность поджигает заклинателя, и временно ускоряет его передвижение.
|
||||
|
||||
<Box>
|
||||
<GuideEntityEmbed Entity="CP14ActionSpellTieflingInnerFire"/>
|
||||
</Box>
|
||||
|
||||
</Document>
|
||||
@@ -5,7 +5,7 @@
|
||||
"y": 32
|
||||
},
|
||||
"license": "CLA",
|
||||
"copyright": "Created by .kreks., cure_poison, cure_burn, mana_gift, water creation, plant_growth, beer creation, sprint and resurrection by TheShuEd",
|
||||
"copyright": "Created by .kreks., cure_poison, cure_burn, mana_gift, water creation, plant_growth, beer creation, sprint, tiefling_revenge and resurrection by TheShuEd",
|
||||
"states": [
|
||||
{
|
||||
"name": "beer_creation"
|
||||
@@ -61,6 +61,9 @@
|
||||
{
|
||||
"name": "sprint"
|
||||
},
|
||||
{
|
||||
"name": "tiefling_revenge"
|
||||
},
|
||||
{
|
||||
"name": "water_creation"
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 458 B |
Reference in New Issue
Block a user