<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.bgtscc.net/index.php?action=history&amp;feed=atom&amp;title=Protection_from_Alignment</id>
	<title>Protection from Alignment - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.bgtscc.net/index.php?action=history&amp;feed=atom&amp;title=Protection_from_Alignment"/>
	<link rel="alternate" type="text/html" href="https://wiki.bgtscc.net/index.php?title=Protection_from_Alignment&amp;action=history"/>
	<updated>2026-10-17T05:20:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.bgtscc.net/index.php?title=Protection_from_Alignment&amp;diff=16751&amp;oldid=prev</id>
		<title>Scuda: fixed duration to round/level</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgtscc.net/index.php?title=Protection_from_Alignment&amp;diff=16751&amp;oldid=prev"/>
		<updated>2025-03-02T07:11:05Z</updated>

		<summary type="html">&lt;p&gt;fixed duration to round/level&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:11, 2 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|range=Touch&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|range=Touch&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|area=Single&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|area=Single&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|duration_type=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;long&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|duration_type=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;short&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|save=Harmless&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|save=Harmless&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|spell_resistance=No&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|spell_resistance=No&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Scuda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgtscc.net/index.php?title=Protection_from_Alignment&amp;diff=2250&amp;oldid=prev</id>
		<title>Valleriani: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgtscc.net/index.php?title=Protection_from_Alignment&amp;diff=2250&amp;oldid=prev"/>
		<updated>2017-08-31T18:22:21Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{spell&lt;br /&gt;
|icon=Is_protectfromalign.png&lt;br /&gt;
|image=&lt;br /&gt;
|level_cleric=1&lt;br /&gt;
|level_paladin=1&lt;br /&gt;
|level_sorwiz=1&lt;br /&gt;
|level_innate=1&lt;br /&gt;
|school=Abjuration&lt;br /&gt;
|descriptor=&lt;br /&gt;
|components=VS&lt;br /&gt;
|range=Touch&lt;br /&gt;
|area=Single&lt;br /&gt;
|duration_type=long&lt;br /&gt;
|save=Harmless&lt;br /&gt;
|spell_resistance=No&lt;br /&gt;
|hostile=No&lt;br /&gt;
|empower=No&lt;br /&gt;
|extend=Yes&lt;br /&gt;
|maximize=No&lt;br /&gt;
|quicken=Yes&lt;br /&gt;
|silent=Yes&lt;br /&gt;
|still=Yes&lt;br /&gt;
|persist=No}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Protection from Alignment&amp;#039;&amp;#039;&amp;#039; allows the caster to choose either protection from evil or protection from good and give the target a +2 [[deflection bonus]] to [[armor class]], a +2 bonus to [[saving throw]]s and immunity to [[mind-affecting]] spells and spell-like effects used by a creature of the chosen type.&lt;br /&gt;
&lt;br /&gt;
== Bugs==&lt;br /&gt;
*The saving throw increase against selected alignment stacks with the saving throw bonus granted by the Magic Circle Against Alignment, provided both this spell and the Magic Circle protect from the same alignment. Deflection bonus does not stack due to the way AC bonuses are applied in NWN2 and protection against mind-affecting spells obviously doesn&amp;#039;t stack either, only the saving throw bonus.&lt;br /&gt;
&lt;br /&gt;
In order to fix this bug, the scripts need to check whether the target is already protected by the respective other spell AND whether the target is protected by their own Magic Circle or by somebody else (if protected by own circle or Protection of Alignment - do nothing, because already protected, if protected by somebody else, remove the Magic Circle effects before applying Protection from Alignment, this is needed in case the target exits the Magic Circle AoE, losing AoE protection).&lt;br /&gt;
&lt;br /&gt;
In order to check for own circle, check all current effects on potential target against GetEffectSpellId (check for SPELL_MAGIC_CIRCLE_AGAINST_GOOD / SPELL_MAGIC_CIRCLE_AGAINST_EVIL) AND GetEffectType (will return 20=EFFECT_TYPE_AREA_OF_EFFECT).&lt;br /&gt;
&lt;br /&gt;
In order to check for Protection from Alignment, simply check against GetHasSpellEffect (SPELL_PROTECTION_FROM_EVIL/SPELL_PROTECTION_FROM_GOOD).&lt;br /&gt;
&lt;br /&gt;
The checks are required when the spells are cast and every time a target enters the Magic Circle zone.&lt;br /&gt;
&lt;br /&gt;
== External resources ==&lt;br /&gt;
*[[NWNWiki:Protection from alignment]]&lt;/div&gt;</summary>
		<author><name>Valleriani</name></author>
	</entry>
</feed>