Skip to content
This repository has been archived by the owner on Jul 19, 2020. It is now read-only.

Latest commit

 

History

History
60 lines (42 loc) · 1.6 KB

attack-bonus.rst

File metadata and controls

60 lines (42 loc) · 1.6 KB

lua

lua

Rules

Attack Bonus

DebugAttackBonus(cre)

Generates a string with attack bonus related information.

param cre

Creature instance.

type cre

Creature

rtype

string

GetAttackBonusVs(cre, atype[, target])

param cre

Creature instance.

type cre

Creature

param int atype

ATTACK_TYPE*

param target

Object instance.

type target

Object

rtype

Total attack bonus.

GetBaseAttackBonus(cre, [pre_epic=false])

Determines base attack bonus.

param cre

Creature instance.

type cre

Creature

param boolean pre_epic

If true only calculate pre-epic BAB.

GetEffectAttackModifier(cre[, atype[, target]])

Determines the attack bonus from effects.

param cre

Creature instance.

type cre

Creature

param int atype

ATTACK_TYPE*

param target

Object instance.

type target

Object

rtype

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.

param cre

Creature instance.

type cre

Creature

rtype

-20, 20

GetRangedAttackMod(cre, target, distance)

param cre

Creature instance.

type cre

Creature

param target

Object instance.

type target

Object

param float distance

Distance to target

rtype

int