Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Web condition provide cover fix

Duskers

Novice
Joined
Feb 6, 2020
Messages
1
Hi,

Here is just a smal fix for web spell ("sp-web on" condition) so it provides cover. It only gives +4 to AC, and no +2 to reflex saves against attacks that originate from a point and do not spread (as it's in manual). It's not new condition, just extender for existing "sp-Web On".

This bonus occurs only if:
- regular cover is not implemented (so it does not stack);
- distance to attacker is more than 5 feet;
- it's range attack.

Feats for reducing this bonus works same as with regular cover:
- improved_precise_shot & sharp_shooting = negate it;
- improved_precise_shot = negate it;
- sharp_shooting = reduce it to +2.

Messages in combat log are equal to regular cover bonus values.

P.S. Have no idea how to force providing total cover (when distance is over 20 feet), so any help would be appreciated:)

Hope that someone find it useful:)

code:
from templeplus.pymod import PythonModifier
from toee import *
import tpdp

print "Web provides cover fix"

def WebCover(attachee, args, evt_obj):

atk = evt_obj.attack_packet.attacker

if evt_obj.attack_packet.get_flags() & D20CAF_RANGED and attachee.distance_to(atk) > 5 and evt_obj.attack_packet.get_flags() & D20CAF_COVER == 0 and atk.has_feat(feat_improved_precise_shot) and atk.has_feat(feat_sharp_shooting):
evt_obj.bonus_list.add_zeroed(335)

elif evt_obj.attack_packet.get_flags() & D20CAF_RANGED and attachee.distance_to(atk) > 5 and evt_obj.attack_packet.get_flags() & D20CAF_COVER == 0 and atk.has_feat(feat_improved_precise_shot):
evt_obj.bonus_list.add_zeroed(335)

elif evt_obj.attack_packet.get_flags() & D20CAF_RANGED and attachee.distance_to(atk) > 5 and evt_obj.attack_packet.get_flags() & D20CAF_COVER == 0 and atk.has_feat(feat_sharp_shooting):
evt_obj.bonus_list.add(2, 0, 336)

elif evt_obj.attack_packet.get_flags() & D20CAF_RANGED and attachee.distance_to(atk) > 5 and evt_obj.attack_packet.get_flags() & D20CAF_COVER == 0:
evt_obj.bonus_list.add(4, 0, 309)

WebProvidesCoverFix = PythonModifier()
WebProvidesCoverFix.ExtendExisting("sp-Web On")
WebProvidesCoverFix.AddHook(ET_OnGetAC, EK_NONE, WebCover, ())
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom