Class: Battle::Move::PreAttackBase

Inherits:
Basic show all
Defined in:
docs/5_Battle_10_Move.rb

Overview

Base class for moves that have a pre-attack effect

Direct Known Subclasses

BeakBlast, FocusPunch, ShellTrap

Instance Method Summary collapse

Methods inherited from Basic

#deal_damage, #effect_working?

Instance Method Details

#can_pre_use_move?(user) ⇒ Boolean

Check if the user is able to display the message related to the move

Parameters:

Returns:

  • (Boolean)


5295
5296
# File 'docs/5_Battle_10_Move.rb', line 5295

def can_pre_use_move?(user)
end

#move_blocked_by_target?(user, target) ⇒ Boolean

Note:

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

Function that tests if the targets blocks the move

Parameters:

Returns:

  • (Boolean) —

    if the target evade the move (and is not selected)



5327
5328
# File 'docs/5_Battle_10_Move.rb', line 5327

def move_blocked_by_target?(user, target)
end

#move_usable?(user, target) ⇒ Boolean

Tell if the move is usable

Parameters:

Returns:

  • (Boolean)


5320
5321
# File 'docs/5_Battle_10_Move.rb', line 5320

def move_usable?(user, target)
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



5314
5315
# File 'docs/5_Battle_10_Move.rb', line 5314

def move_usable_by_user(user, targets)
end

#pre_attack? ⇒ Boolean

Is the move doing something before any other moves ?

Returns:

  • (Boolean)


5287
5288
# File 'docs/5_Battle_10_Move.rb', line 5287

def pre_attack?
end

#pre_attack_animation(user)

Display the charging animation

Parameters:



5307
5308
# File 'docs/5_Battle_10_Move.rb', line 5307

def pre_attack_animation(user)
end

#pre_attack_effect(user)

Class of the Effect given by this move

Parameters:



5299
5300
# File 'docs/5_Battle_10_Move.rb', line 5299

def pre_attack_effect(user)
end

#pre_attack_message(user)

Display the charging message

Parameters:



5303
5304
# File 'docs/5_Battle_10_Move.rb', line 5303

def pre_attack_message(user)
end

#proceed_pre_attack(user)

Proceed the procedure before any other attack.

Parameters:



5291
5292
# File 'docs/5_Battle_10_Move.rb', line 5291

def proceed_pre_attack(user)
end