Class: TwoWeaponAttackAction
- Inherits:
-
AttackAction
- Object
- Natural20::Action
- AttackAction
- TwoWeaponAttackAction
- Defined in:
- lib/natural_20/actions/attack_action.rb
Instance Attribute Summary
Attributes inherited from AttackAction
#advantage_mod, #as_reaction, #npc_action, #target, #thrown, #using
Attributes inherited from Natural20::Action
#action_type, #errors, #result, #session, #source
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from AttackAction
build, #build_map, consume_resource, #resolve, #to_s, #with_advantage?, #with_disadvantage?
Methods included from Natural20::ActionDamage
Methods included from Natural20::AttackHelper
#after_attack_roll_hook, #calculate_cover_ac, #effective_ac
Methods included from Natural20::Weapons
#compute_advantages_and_disadvantages, #damage_modifier, #target_advantage_condition
Methods included from Natural20::Cover
Methods inherited from Natural20::Action
#initialize, #name, #resolve, #to_s, #validate
Constructor Details
This class inherits a constructor from Natural20::Action
Class Method Details
.apply!(battle, item) ⇒ Object
382 |
# File 'lib/natural_20/actions/attack_action.rb', line 382 def self.apply!(battle, item); end |
.can?(entity, battle, options = {}) ⇒ Boolean
368 369 370 371 372 |
# File 'lib/natural_20/actions/attack_action.rb', line 368 def self.can?(entity, battle, = {}) battle.nil? || (entity.total_bonus_actions(battle).positive? && battle.two_weapon_attack?(entity) && ([:weapon] != battle.first_hand_weapon(entity) || entity.equipped_weapons.select do |a| a.to_s == battle.first_hand_weapon(entity) end.size >= 2)) end |
Instance Method Details
#label ⇒ Object
378 379 380 |
# File 'lib/natural_20/actions/attack_action.rb', line 378 def label "Bonus Action -> #{super}" end |
#second_hand ⇒ Object
374 375 376 |
# File 'lib/natural_20/actions/attack_action.rb', line 374 def second_hand true end |