Table of Contents

Method GetAttackBonus

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

GetAttackBonus(bool, bool, bool, bool)

Gets the creature's highest attack bonus based on its own stats.
AB vs. Type and +AB on Gauntlets are excluded.

public int GetAttackBonus(bool isMelee = false, bool isTouchAttack = false, bool isOffHand = false, bool includeBaseAttackBonus = true)

Parameters

isMelee bool

TRUE: Get Melee/Unarmed Attack Bonus, FALSE: Get Ranged Attack Bonus

isTouchAttack bool

If the attack was a touch attack.

isOffHand bool

If the attack was a touch attack.

includeBaseAttackBonus bool

If the attack was with the offhand.

Returns

int

The highest attack bonus.