Class: Battle::Effects::Protect::MatBlock

Inherits:
Protect
  • Object
show all
Defined in:
docs/5_Battle_06_Effects_02_Move_Effects.rb

Overview

Implement the Mat Block effect

Instance Method Summary collapse

Instance Method Details

#goes_through_protect?(user, target, move) ⇒ Boolean

Function called when we try to check if the move goes through protect

Parameters:

Returns:

  • (Boolean) —

    if the move goes through protect



1768
1769
# File 'docs/5_Battle_06_Effects_02_Move_Effects.rb', line 1768

def goes_through_protect?(user, target, move)
end

#move_usable_by_user(user, targets) ⇒ Boolean

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



1761
1762
# File 'docs/5_Battle_06_Effects_02_Move_Effects.rb', line 1761

def move_usable_by_user(user, targets)
end