Module: Battle::Move::Mechanics::ItemBased

Included in:
PowerBasedOnItem, TypesBasedOnItem
Defined in:
docs/5_Battle_10_Move.rb

Overview

Preset used for item based attacks Should be included only in a Battle::Move class or a class with the same interface The includer must overwrite the following methods:

  • private consume_item?

  • private valid_item_hold?

Instance Method Summary collapse

Instance Method Details

#move_usable_by_user(user, targets) ⇒ Boolean Also known as: item_based_move_usable_by_user

Note:

Thing that prevents the move from being used should be defined by :move_prevention_user Hook

Function that tests if the user is able to use the move

Parameters:

Returns:

  • (Boolean)

    if the procedure can continue



965
966
# File 'docs/5_Battle_10_Move.rb', line 965

def move_usable_by_user(user, targets)
end