Attack Bonus

DebugAttackBonus(cre)

Generates a string with attack bonus related information.

Parameters:
Return type:

string

GetAttackBonusVs(cre, atype[, target])
Parameters:
  • cre (Creature) – Creature instance.
  • atype (int) – ATTACK_TYPE_*
  • target (Object) – Object instance.
Return type:

Total attack bonus.

GetBaseAttackBonus(cre[, pre_epic=false])

Determines base attack bonus.

Parameters:
  • cre (Creature) – Creature instance.
  • pre_epic (boolean) – If true only calculate pre-epic BAB.
GetEffectAttackModifier(cre[, atype[, target]])

Determines the attack bonus from effects.

Parameters:
  • cre (Creature) – Creature instance.
  • atype (int) – ATTACK_TYPE_*
  • target (Object) – Object instance.
Return type:

If atype is passed to the function the unclamped attack bonus is returned, if not an int32_t array of all ATTACK_TYPE_* bonuses is returned.

GetEffectAttackLimits(cre)

Determines the minimum and maximum attack bonus can be modified by effects.

Parameters:
Return type:

-20, 20

GetRangedAttackMod(cre, target, distance)
Parameters:
  • cre (Creature) – Creature instance.
  • target (Object) – Object instance.
  • distance (float) – Distance to target
Return type:

int