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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user