* Refactor pacified block logic to action system Moved pacified block functionality from magic spell components to the new CP14ActionSystem and related components. Removed CP14MagicEffectPacifiedBlockComponent and its logic, and introduced CP14ActionDangerousComponent for handling pacified checks. Updated examine and checks logic to use the new action-based components, improving separation of concerns between magic and action systems. * finish pacified * mobtargetstate refactor * skillpoint cost refactor * somaticAspect refactor * material cost refactor * mana cost now * stamina cost * SSD + verbal aspect * religion * music tool refactor * vampire * get rid of this event * manacost refac * Remove magicType field from spell definitions Eliminated the 'magicType' property from all CP14MagicEffect components in spell YAML files across Electric, Fire, Life, Light, and Water categories. This streamlines spell configuration and may reflect a change in how magic types are handled in the system. * Remove mana cost reduction effects from skill tiers Eliminated the ModifyManacost effects from tier 2 and tier 3 skills in electromancy, healing, hydrosophistry, illusion, and pyrokinetic. This change standardizes skill progression and may be part of a balance update to mana cost mechanics. * comment out T3 tiers * namespace refactor * fix hands
43 lines
1.5 KiB
C#
43 lines
1.5 KiB
C#
using Content.Shared._CP14.MagicSpell.Events;
|
|
using Content.Shared._CP14.Vampire.Components;
|
|
using Content.Shared.Actions.Events;
|
|
using Content.Shared.Examine;
|
|
using Content.Shared.Mobs.Systems;
|
|
using Content.Shared.SSDIndicator;
|
|
|
|
namespace Content.Shared._CP14.Vampire;
|
|
|
|
public abstract partial class CP14SharedVampireSystem
|
|
{
|
|
[Dependency] private readonly MobStateSystem _mobState = default!;
|
|
|
|
private void InitializeSpell()
|
|
{
|
|
SubscribeLocalEvent<CP14MagicEffectVampireComponent, ActionAttemptEvent>(OnVampireCastAttempt);
|
|
SubscribeLocalEvent<CP14MagicEffectVampireComponent, ExaminedEvent>(OnVampireCastExamine);
|
|
}
|
|
|
|
private void OnVampireCastAttempt(Entity<CP14MagicEffectVampireComponent> ent, ref ActionAttemptEvent args)
|
|
{
|
|
if (args.Cancelled)
|
|
return;
|
|
|
|
//If we are not vampires in principle, we certainly should not have this ability,
|
|
//but then we will not limit its use to a valid vampire form that is unavailable to us.
|
|
|
|
if (!HasComp<CP14VampireComponent>(args.User))
|
|
return;
|
|
|
|
if (!HasComp<CP14VampireVisualsComponent>(args.User))
|
|
{
|
|
_popup.PopupClient(Loc.GetString("cp14-magic-spell-need-vampire-valid"), args.User, args.User);
|
|
args.Cancelled = true;
|
|
}
|
|
}
|
|
|
|
private void OnVampireCastExamine(Entity<CP14MagicEffectVampireComponent> ent, ref ExaminedEvent args)
|
|
{
|
|
args.PushMarkup($"{Loc.GetString("cp14-magic-spell-need-vampire-valid")}");
|
|
}
|
|
}
|