PDA

View Full Version : How would you write an effect for old school Protection from Evil type?



celestian
September 4th, 2017, 05:53
To explain, I want to have a effect that is placed on a Paladin. The effect is a protection from evil which reduces the ability of evil creatures to hit them.

Is there a way to write an effect that is placed on the Paladin that would reduce the ATK of a enemy striking him if the enemy's alignment was evil?

I've looked at IF/IFT ALIGN(evil)/etc but unsure if those are of use when something is attacking the Paladin and not the other way round.

Nickademus
September 4th, 2017, 07:56
I think 'IFT: ALIGN (evil); AC: 2' should work. It would check if the target of the action causing the AC calculation was evil.

celestian
September 4th, 2017, 08:33
I think 'IFT: ALIGN (evil); AC: 2' should work. It would check if the target of the action causing the AC calculation was evil.

That seems to work. I'll do a bit more testing but it does seem to give the target of an evil critter +2 ac!

Thanks Nick.

Nickademus
September 4th, 2017, 09:25
No problem.

Zacchaeus
September 4th, 2017, 11:21
If you look at the list of modifiers in the Effects article on the Wiki; you'll notice a number of them have a 'T' in the notes box. This means that you could potentially use those modifiers in an IF or IFT statement. So you could as Nick suggested use AC, but you could also use GRANTDISATK, or you could have RESIST: slashing, bludgeoning, piercing. You could even have DMG: -1d6 or something similar.

celestian
September 4th, 2017, 21:23
If you look at the list of modifiers in the Effects article on the Wiki; you'll notice a number of them have a 'T' in the notes box. This means that you could potentially use those modifiers in an IF or IFT statement. So you could as Nick suggested use AC, but you could also use GRANTDISATK, or you could have RESIST: slashing, bludgeoning, piercing. You could even have DMG: -1d6 or something similar.

So I started playing with this and made an effect that would do more damage versus evil.



IFT: ALIGN (evil); DMG: 2;


If works for the paladin when he attacks evil he does +2 damage.... it's the same type of effect I used for the AC boost for the paladin.



IFT: ALIGN (evil); AC: 2;



Very mind twisting. Logic (well, my logic) would suggest that the evil creature would do +2 damage to the PC (it doesn't btw).

What is the logic here that keeps it from doing that? Does it only check "defensive type" effects when attacking a target?

Nickademus
September 4th, 2017, 21:48
The logic is that the first component 'IFT: ALIGN (evil)' is a conditional and completely unrelated in FG's eyes to the second component 'AC: 2' or 'DMG: 2'. FG checks to see if the conditional is true or false. If false, it ignores everything after it. If true, it processes the remaining components which in this case is a buff for the creature it is on. By that point, FG doesn't even know who the target was whose alignment was checked; it's just looking for modifiers to the creature's armor class/damage.

celestian
September 4th, 2017, 22:09
The logic is that the first component 'IFT: ALIGN (evil)' is a conditional and completely unrelated in FG's eyes to the second component 'AC: 2' or 'DMG: 2'. FG checks to see if the conditional is true or false. If false, it ignores everything after it. If true, it processes the remaining components which in this case is a buff for the creature it is on. By that point, FG doesn't even know who the target was whose alignment was checked; it's just looking for modifiers to the creature's armor class/damage.

That's why I don't understand why the attacking evil creature doesn't get +2 damage to his damage.

If "IFT: ALIGN (evil); AC: 2;" gives the player +2 AC because the ATTACKER is evil then shouldn't also work the same for "IFT: ALIGN (evil); DMG: 2;" meaning that the .... oh, yeah. now I get it. The "effect" only effects the person with the effect ON them. So I couldn't do something like ATK: -2; to reduce the enemy attacking ability to hit but AC: 2; does work.

LordEntrails
September 4th, 2017, 22:20
Because the IFT statement is evaluated on outgoing attacks and not incoming?

celestian
September 5th, 2017, 00:16
Because the IFT statement is evaluated on outgoing attacks and not incoming?

If that was true then it wouldn't work for the AC: 2 added to paladin when attacked by the evil critter (it does work btw).

Nickademus
September 5th, 2017, 00:40
Because the IFT statement is evaluated on outgoing attacks and not incoming?

It's not the IFT that he's referring to. It's the 'AC' tag. When a creature is attacked, FG looks through all the effects on that creature for modifiers to AC which seems to be the reverse of most of the effect tags which do something based on the one doing the action. In reality, FG looks through the effects twice in this situation: once on the attacking creature for effects that modify ATK or any relevant ability score or value, and again on the defending creature for effects that modify AC or any relevant ability score or value.