class TwoWeaponAttackAction

Public Class Methods

apply!(battle, item) click to toggle source
# File lib/natural_20/actions/attack_action.rb, line 382
def self.apply!(battle, item); end
can?(entity, battle, options = {}) click to toggle source

@param entity [Natural20::Entity] @param battle [Natural20::Battle]

# File lib/natural_20/actions/attack_action.rb, line 368
def self.can?(entity, battle, options = {})
  battle.nil? || (entity.total_bonus_actions(battle).positive? && battle.two_weapon_attack?(entity) && (options[:weapon] != battle.first_hand_weapon(entity) || entity.equipped_weapons.select do |a|
    a.to_s == battle.first_hand_weapon(entity)
  end.size >= 2))
end

Public Instance Methods

label() click to toggle source
# File lib/natural_20/actions/attack_action.rb, line 378
def label
  "Bonus Action -> #{super}"
end
second_hand() click to toggle source
# File lib/natural_20/actions/attack_action.rb, line 374
def second_hand
  true
end