rollnw.nwn1

rollnw.nwn1.attacks_per_second(obj: Creature, type, versus: ObjectBase) float

Number of attacks per second

rollnw.nwn1.base_attack_bonus(obj: Creature) int

Calculates base attack bonus

rollnw.nwn1.calculate_ac_versus(obj: ObjectBase, versus: ObjectBase | None = None, is_touch_attack: bool = False) int

Calculate Armor Class versus another object

rollnw.nwn1.calculate_item_ac(obj: Item) int

Calculates the armor class of a piece of armor

rollnw.nwn1.can_equip_item(obj: Creature, item: Item, slot: int)

Determines if an item can be equipped

rollnw.nwn1.can_use_monk_abilities(obj: Creature) Tuple[bool, int]

Determines if monk class abilities are usable and monk class level

rollnw.nwn1.effect_ability_modifier(ability, modifier) Effect

Creates an ability modifier effect

rollnw.nwn1.effect_armor_class_modifier(type, modifier) Effect

Creates an armor class modifier effect

rollnw.nwn1.effect_attack_modifier(attack, modifier) Effect

Creates an attack modifier effect

rollnw.nwn1.effect_haste() Effect

Creates a haste effect

rollnw.nwn1.effect_skill_modifier(skill, modifier) Effect

Creates an skill modifier effect

rollnw.nwn1.equip_index_to_attack_type(equip)

Converts an equip index to an attack type

rollnw.nwn1.equip_item(obj: Creature, item: Item, slot: int)

Equip an item

rollnw.nwn1.get_ability_modifier(obj: Creature, ability, base: bool = False) int

Gets creatures ability modifier

rollnw.nwn1.get_ability_score(obj: Creature, ability, base: bool = False) int

Gets creatures ability score

rollnw.nwn1.get_caster_level(obj: Creature, class_: int) int

Gets creatures caster level

rollnw.nwn1.get_dex_modifier(obj: Creature) int

Gets creatures dexterity modifier as modified by armor, etc.

rollnw.nwn1.get_equipped_item(obj: Creature, slot)

Gets an equipped item

rollnw.nwn1.get_skill_rank(obj: Creature, skill, versus=None, base=False)

Determines creatures skill rank

rollnw.nwn1.get_spell_dc(obj: Creature, class_: int, spell: int) int

Gets spell DC

rollnw.nwn1.get_weapon_by_attack_type(obj: Creature, type) Item

Gets an equipped weapon by attack type

rollnw.nwn1.is_flanked(target: Creature, attacker: Creature) bool
rollnw.nwn1.is_ranged_weapon(item: Item) bool

Determines if weapon is ranged

rollnw.nwn1.is_shield(baseitem) bool

Determines if item is a shield

rollnw.nwn1.itemprop_ability_modifier(ability, modifier) ItemProperty

Creates ability modifier item property

rollnw.nwn1.itemprop_armor_class_modifier(value) ItemProperty

Creates armor modifier item property

rollnw.nwn1.itemprop_attack_modifier(value) ItemProperty

Creates attack modifier item property

rollnw.nwn1.itemprop_enhancement_modifier(value) ItemProperty

Creates enhancement modifier item property

rollnw.nwn1.itemprop_haste() ItemProperty

Creates haste item property

rollnw.nwn1.itemprop_skill_modifier(skill, modifier) ItemProperty

Creates skill modifier item property

rollnw.nwn1.queue_remove_effect_by(obj: ObjectBase, creator: ObjectHandle)

Queues remove effect events by effect creator

rollnw.nwn1.resolve_attack(obj: Creature, type, versus: ObjectBase)

Resolves an attack

rollnw.nwn1.resolve_attack_bonus(obj: Creature, type, versus: ObjectBase | None = None) int

Calculates attack bonus

rollnw.nwn1.resolve_attack_damage(obj: Creature, versus: ObjectBase, data: AttackData) int

Resolves damage from an attack

rollnw.nwn1.resolve_concealment(obj: ObjectBase, type, target: ObjectBase, vs_ranged: bool) Tuple[int, bool]

Resolves an concealment - i.e. the highest of concealment and miss chance

rollnw.nwn1.resolve_critical_multiplier(obj: Creature, type, versus: ObjectBase | None = None) int

Resolves critical multiplier

rollnw.nwn1.resolve_critical_threat(obj: Creature, type) int

Resolves critical multiplier

rollnw.nwn1.resolve_damage_immunity(obj: ObjectBase, dmg_type, versus: ObjectBase | None = None) int

Resolves damage immunity

rollnw.nwn1.resolve_damage_modifiers(obj: Creature, versus: ObjectBase, data: AttackData) None

Resolves resistance, immunity, and reduction

rollnw.nwn1.resolve_damage_reduction(obj: ObjectBase, power: int, versus: ObjectBase | None = None) Tuple[int, Effect]

Resolves damage reduction

rollnw.nwn1.resolve_damage_resistance(obj: ObjectBase, dmg_type, versus: ObjectBase | None = None) Tuple[int, Effect]

Resolves damage resistance

rollnw.nwn1.resolve_dual_wield_penalty(obj: Creature) Tuple[int, int]

Resolves dual wield attack bonus penalty

rollnw.nwn1.resolve_iteration_penalty(obj: Creature, attack_type)

Resolves iteration attack bonus penalty

rollnw.nwn1.resolve_number_of_attacks(obj: Creature, offhand: bool = False) Tuple[int, int]

Calculates number of attacks

rollnw.nwn1.resolve_target_state(obj: Creature, versus: ObjectBase)

Resolves damage from an attack

rollnw.nwn1.resolve_unarmed_damage(obj: Creature) DiceRoll

Resolves unarmed damage

rollnw.nwn1.resolve_weapon_damage(obj: Creature, weapon: Item) DiceRoll

Resolves weapon damage

rollnw.nwn1.resolve_weapon_power(obj: Creature, weapon: Item) int

Resolves weapon power

rollnw.nwn1.unequip_item(obj: Creature, slot: int)

Unequips an item

rollnw.nwn1.weapon_is_finessable(obj: Creature, weapon: Item) bool

Determines if a weapon is finessable

rollnw.nwn1.weapon_iteration(obj: Creature, weapon: Item) int

Calculates weapon iteration, e.g. 5 or 3 for monk weapons