Global spell changes from Community Patch

Weapon boost spells

Weapon boost spells are now compatible with any custom content, thus they will work for example with CEP weapons or Lance. Also, added missing impact visual effect in case a spell was cast on a weapon laying on the ground.

Spells affected: magic weapon, greater magic weapon, bless weapon, blade thirst, flame weapon, darkfire, holy avenger, deafening clang, keen edge

Spell cones

Cone-shaped spells could, in certain circumstances, affect the caster. This has been fixed (the caster excluded from the targets) in burning hands, color spray, cone of cold, Mestil's acid breath, and prismatic spray.

ResistSpell order changed

Spell mantle was tested before the immunity to spell levels. For example Fire Arrow spell

previously stripped spell mantle no matter its a level 3 spell and should be blocked by globe. Due to the criticism of few nwn veterans who claim this behavior is correct, there is a module switch (MODULE_SWITCH_SPELL_MANTLE_169_BEHAVIOR) to revert this feature into default behavior. See CP basic readme for details on this subject.

Stacking

Spells no longer stack with feats of the same name. This affects bull's strength, cat's grace, and eagle's splendor.

Global change to all AOE spells

- AOE effects made undispellable (the effects are dependant on AOE presence, they shouldn't be dispelled without dispelling the AOE itself)

- added caster validity checks to the AOEs which were missing it (evard’s black tentacles, stinking cloud, spike growth, storm of vengeance), AOE will now properly vanish when player leaves a game

- fixed heartbeat bug which happened in big modules, a module builder must enforce this fix using a new module switch that was added by CP (see full readme)

- saving throws inside AOEs corrected, almost all AOE spells were inputting into MySavingThrows function the OBJECT_SELF instead of the GetAreaOfEffectCreator(), which could reject target's saving throw bonuses against alignment.

Aura-like AOEs improvements

- the moving bug has been fixed, auras will never disappear prematurely anymore

- also the functionality of the auras have been improved, the aura’s owner won’t lose bonuses anymore when moving

- auras circle visual effect has been fixed, to not disappear when changing areas. Also the circle visual is not visible anymore on a target that is currently invisible to the player (notice: player might notice there are two circles in the initial casting area; this is safety behavior to maintain backwards compatibility with servers not using CP)

- aura-like spells cannot stack anymore, new casting replaces the old AOE and its effects

Spell affected: battletide, dirge, magic circle against alignment, and silence.

Empower metamagic calculation united

There were two metamagic calculation formulas across all NWN spells. One from OC that empowered total result of the spell normal damage and one from SoU expansion that empowers only dice values. While previously, Community patch set as default the SoU formula, on a suggestion from the community, this has been revisited and the new default calculation is the OC formula: empower full result of the normal spell damage.

Those who wants to enforce the CPP previous behavior can now do this via a module switch:

MODULE_SWITCH_SOU_EMPOWER_SPELL_BEHAVIOR = “71_SOU_EMPOWER_SPELL_BEHAVIOR”

The “no-roll” behavior

All saving throws were united into the "if immune, do not roll at all" behavior. This unite

also fixes the action cancel bug that occured when there was EffectDeath applied at character

immune to death.

Target check change

Most pre-HotU spells had old target check; it worked fine, however the one from HotU have different behavior. Player could recognize it as the spells with old target check affected dead creatures, while the spells with new check don't.

This also fixes the problem with spell-abilities, which affected other NPCs as well. With

this comes the new constant into spellsIsTarget function as there was actually reason why

half the spell didn’t used the new HotU target check - it was in order to allow to hurt neutral creatures with these spells as the new target check doesn’t allow this. For these spells were created new constant SPELL_TARGET_SINGLETARGET to allow damage even neutral creature if player wishes so.

More target check fixes and features

- fixed self-targeting: NPCs could hurt themselves with their spell or spell-ability on high

difficulty because of a bug in the code meant for players

- fixed rare case when invisible DM was targeted with standard hostile AOE spell

- PC won't hurt himself in No-PvP areas anymore (was possible at high difficulty settings)

- on "Very difficult" difficulty setting, the SPELLTARGET_SELECTIVE_HOSTILE spells will behave as if it was SPELLTARGET_STANDARD_HOSTILE (thus for example badly placed Isaac’s missile storm on highest difficulty will affect allies)

- also added a feedback message for direct target hostile spells cast on friendly target

Caster/Target switch

Several spells that can be cast only at self, gave bonuses solely to the caster. This wasn't however correct in all cases. For example if there would be custom potion with such spell and you would give it to your familiar/henchman, it would not be him who would get the bonuses, but you. This is now fixed. Also, this makes possible for custom content to simply adjust spells.2da and allow such spells to be cast at other targets and the spell will work automatically in the builder's intend.

Spells affected: Minor globe of invulnerability, Globe of invulnerability, Shield, Identify, Fire shield, Aura of glory, Divine favor, One with the land, Mestil's acid sheat, War cry, Tenser's

Transformation, Blood frenzy, Entropic shield, Balagarn's iron horn, True strike, Wounding

whispers, Battletide and Dirge

Immunity bypassing exploit

Fixed bug in ResistSpell function when used inside AOEs that allowed to bypass target immunity or to make yourself immune. This solution also comes with a cost of a spell mantle effect is no longer used for AOE effects (which is correct per DnD rules anyway).

Signal event from AOEs

AOE signal event united to use OBJECT_SELF rather GetAreaOfEffectCreator(), ín OnSpellCastAt event you should test if the last caster is not AOE and if so, you can adjust your code on this fact, you can get the original caster by GetAreaOfEffectCreator() function here again. Previously some AOE spells signalized this event with AOE creator.

AOEs affected: Acid Fog, Blade of Barrier, Web, Creeping Doom, Storm of Vengeance, Silence,

Invisibility Purge, Glyph of Warding, Spike Growth, Vine Mine (all three variants), various

creature's auras (fire, stun, cold, unearthly visage, unnatural, trogodlyte stench), Caltrops

Metamagic correction

A table below shows various changes in metamagic possibilities. These changes correct the several inconsistencies with the metamagic rules, such as that only spells with verbal component can be silenced, only spells with somatic can be stilled or that spells with fixed duration cannot be extended. In case of Tasha, empower/maximize metamagic wasn’t enabled in spell result, neither it should be possible at all. On the contrary, cloud of bewilderment now adds this possibility because the metamagic doesn’t affect the spell duration which is still round/level but duration of the secondary effect which is dice based.

Spell name

Extend

Still

Silent

Empower

Maximize

Quicken

Cloud of bewilderment

+

+

Ethereal visage

-

Knock

-

+

Dispel magic, lesser

-

+

Ray of enfeeblement

-

Scare

+

Shadow conjuration

+

Shadow conjuration, greater

+

Shelgarn’s persistent blade

+

-

Sound burst

+

Stone to flesh

-

Sunbeam

+

Tasha's hideous laughter

-

-

Ultravision

+

Wounding whispers

-

-

Individual spell changes from Community Patch

Acid fog

Aid

Aura of glory

Aura of vitality

Awaken

Balagarn's iron horn

Ball lightning

Bane

Banishment

Battletide

Bigby's grappling hand

Bigby's crushing hand

Bigby's forceful hand

Black blade of disaster

Blade thirst

Bless

Blood frenzy

Breach spell line (Lesser spell breach, Greater spell breach, Mordenkainen’s disjunction)

Burning hands

Charm monster or animal and charm person

Circle of doom

Clairaudience/clairvoyance

Cloud of bewilderment

Cloudkill

Color spray

Cone of cold

Confusion

Continual flame

Control Undead

Creeping doom

Crumble

Cure wounds spell line

Darkfire

Darkness

Deafening clang

Delayed Blast Fireball

Destruction

Dirge

Dismissal

Divine power

Dominate animal

Dominate monster

Dominate person

Doom

Drown

Earthquake

Endure elements

Entangle

Epic spell: greater ruin

Epic spell: hellball

Evard’s black tentacles

Expeditious retreat

Fear

Feeblemind

Find traps

Finger of death

Fire storm

Fireball

Flame arrow

Flame strike

Flame weapon

Flare

Gate, impact script

Gate, Balor’s death script

Gedlee's electric loop

Ghoul touch: impact script

Ghoul touch: AoE enter

Glyph of warding

Grease

Great thunderclap

Greater bull's strength

Gust of wind

Harm

Haste

Haste, mass

Heal

Heal, mass

Healing circle

Hold animal

Hold monster

Hold person

Holy sword

Horizikaul's boom

Ice dagger

Identify

Implosion

Inferno

Infestation of maggots

Inflict wounds spell line

Keen edge

Legend lore

Light

Lightning bolt

Magic circle against alignment

Magic vestment

Magic weapon

Magic weapon, greater

Mass charm

Melf's acid arrow

Mestil’s acid breath

Meteor swarm

Mind fog

Monstrous regeneration

Nature balance

Negative energy burst

Negative energy ray

Neutralize poison

Phantasmal killer

Planar binding, lesser

Planar binding, greater

Prismatic spray

Ray of enfeeblement

Regeneration

Remove disease

Resistance

Restoration, lesser

Restoration, greater

Scare

Silence

Shades

Shadow conjuration

Shelgarn's persistent blade

Shield of faith

Slay living

Sleep

Slow

Sound burst

Spike growth

Stinking cloud

Stone bones

Stonehold

Storm of vengeance

Summon creature spell line

Sunbeam

Sunburst

Tashas's hideous laughter

Time stop

Undeath to death

Vampire touch

Vine mine, entangle

Vine mine, hamper movement

Vine mine, camouflage

Wail of the banshee

War cry

Weird

Wounding whispers

Special spells:

Cure critical wounds (others)

Evil blight (unimplemented spell, however scrolls are available)

Protection against Chaos

Protection against Law

Magic circle against Chaos

Magic circle against Law