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:
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, ())