Class: Battle::Move::AbilityChanging

Inherits:
Move
  • Object
show all
Defined in:
docs/5_Battle_10_Move.rb

Overview

Class managing ability changing moves

Direct Known Subclasses

Entrainment, RolePlay, SkillSwap

Instance Method Summary collapse

Instance Method Details

#ability_symbol(battler) ⇒ Symbol

Function that returns the battle ability of a battler

Parameters:

Returns:

  • (Symbol)


1522
1523
# File 'docs/5_Battle_10_Move.rb', line 1522

def ability_symbol(battler)
end

#can_be_used?(user, target) ⇒ Boolean

Checks if the user can use the move

Parameters:

Returns:

  • (Boolean)


1510
1511
# File 'docs/5_Battle_10_Move.rb', line 1510

def can_be_used?(user, target)
end

#deal_effect(user, actual_targets)

Function that deals the effect to the pokemon

Parameters:



1504
1505
# File 'docs/5_Battle_10_Move.rb', line 1504

def deal_effect(user, actual_targets)
end

#giver(user, target) ⇒ PFM::PokemonBattler

Function that returns the giver of the ability

Parameters:

Returns:



1534
1535
# File 'docs/5_Battle_10_Move.rb', line 1534

def giver(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



1499
1500
# File 'docs/5_Battle_10_Move.rb', line 1499

def move_usable_by_user(user, targets)
end

#post_ability_change_message(receiver, giver) ⇒ String

Note:

data_ability(ability_symbol(giver)).name to manage the Classic and Simple Beam cases

Get the post ability change message

Parameters:

Returns:



1517
1518
# File 'docs/5_Battle_10_Move.rb', line 1517

def post_ability_change_message(receiver, giver)
end

#receiver(user, target) ⇒ PFM::PokemonBattler

Function that returns the receiver of the ability

Parameters:

Returns:



1528
1529
# File 'docs/5_Battle_10_Move.rb', line 1528

def receiver(user, target)
end