Lumera patron (#1427)

* mind upgrade works only on followers

* wrath of lumera, removing memory points

* enable lumera for players

* add lumera to maps

* job desc update

* guidebook
This commit is contained in:
Red
2025-06-15 15:00:18 +03:00
committed by GitHub
parent 4be22326ce
commit 04f6627e16
34 changed files with 592 additions and 200 deletions

View File

@@ -155,7 +155,8 @@ public abstract partial class CP14SharedMagicSystem
}
}
private void OnReligionRestrictedCheck(Entity<CP14MagicEffectReligionRestrictedComponent> ent, ref CP14CastMagicEffectAttemptEvent args)
private void OnReligionRestrictedCheck(Entity<CP14MagicEffectReligionRestrictedComponent> ent,
ref CP14CastMagicEffectAttemptEvent args)
{
if (!TryComp<CP14ReligionEntityComponent>(args.Performer, out var religionComp))
return;
@@ -165,13 +166,22 @@ public abstract partial class CP14SharedMagicSystem
if (args.Target is not null)
position ??= Transform(args.Target.Value).Coordinates;
if (position is null)
return;
if (ent.Comp.OnlyInReligionZone)
{
if (position is null || !_god.InVision(position.Value, (args.Performer, religionComp)))
{
args.Cancel();
}
}
if (_god.InVision(position.Value, (args.Performer, religionComp)))
return;
args.Cancel();
if (ent.Comp.OnlyOnFollowers)
{
if (args.Target is null || !TryComp<CP14ReligionFollowerComponent>(args.Target, out var follower) || follower.Religion != religionComp.Religion)
{
args.PushReason(Loc.GetString("cp14-magic-spell-target-god-follower"));
args.Cancel();
}
}
}
private void OnVerbalAspectStartCast(Entity<CP14MagicEffectVerbalAspectComponent> ent,