Module: Battle::VisualMock

Defined in:
docs/5_Battle_30_AI.rb

Overview

Module responsive of mocking the battle visual so nothing happen on the reality

Note: super inside this script might call the original function

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(mod)

Method called when a visual gets mocked (through extend)

Parameters:



53
54
# File 'docs/5_Battle_30_AI.rb', line 53

def extended(mod)
end

Instance Method Details

#hide_team_info

Hide team info



106
107
# File 'docs/5_Battle_30_AI.rb', line 106

def hide_team_info
end

#lock

Lock the battle scene



57
58
# File 'docs/5_Battle_30_AI.rb', line 57

def lock
end

#refresh_info_bar(pokemon)

Refresh a specific bar (when Pokemon loses HP or change state)

Parameters:



84
85
# File 'docs/5_Battle_30_AI.rb', line 84

def refresh_info_bar(pokemon)
end

#set_info_state(state, pokemon = nil)

Set the state info

Parameters:

  • state (Symbol) —

    kind of state (:choice, :move, :move_animation)

  • pokemon (Array<PFM::PokemonBattler>) (defaults to: nil) —

    optional list of Pokemon to show (move)



100
101
# File 'docs/5_Battle_30_AI.rb', line 100

def set_info_state(state, pokemon = nil)
end

#show_ability(target)

Show the ability animation

Parameters:



61
62
# File 'docs/5_Battle_30_AI.rb', line 61

def show_ability(target)
end

#show_exp_distribution(exp_data)

Show the exp distribution

Parameters:

  • exp_data (Hash{ PFM::PokemonBattler => Integer }) —

    info about experience each pokemon should receive



65
66
# File 'docs/5_Battle_30_AI.rb', line 65

def show_exp_distribution(exp_data)
end

#show_hp_animations(targets, hps, effectiveness = [], &messages)

Show HP animations

Parameters:

  • targets (Array<PFM::PokemonBattler>)
  • hps (Array<Integer>)
  • effectiveness (Array<Integer, nil>) (defaults to: [])
  • messages (Proc) —

    messages shown right before the post processing



91
92
# File 'docs/5_Battle_30_AI.rb', line 91

def show_hp_animations(targets, hps, effectiveness = [], &messages)
end

#show_item(target)

Show the item user animation

Parameters:



80
81
# File 'docs/5_Battle_30_AI.rb', line 80

def show_item(target)
end

#show_move_animation(user, targets, move)

Make a move animation

Parameters:



112
113
# File 'docs/5_Battle_30_AI.rb', line 112

def show_move_animation(user, targets, move)
end

#show_pokemon_choice(forced = false, cannot_switch_index: nil) ⇒ PFM::PokemonBattler?

Method that show the pokemon choice

Parameters:

  • forced (Boolean) (defaults to: false)
  • cannot_switch_index (Integer, nil) (defaults to: nil) —

    Index of the trapped party member if a switch cannot happen

Returns:



71
72
# File 'docs/5_Battle_30_AI.rb', line 71

def show_pokemon_choice(forced = false, cannot_switch_index: nil)
end

#show_rmxp_animation(target, id)

Show a dedicated animation

Parameters:



76
77
# File 'docs/5_Battle_30_AI.rb', line 76

def show_rmxp_animation(target, id)
end

#show_switch_form_animation(target)

Show the pokemon switch form animation

Parameters:



95
96
# File 'docs/5_Battle_30_AI.rb', line 95

def show_switch_form_animation(target)
end

#wait_for_animation

Wait for all animation to end (non parallel one)



103
104
# File 'docs/5_Battle_30_AI.rb', line 103

def wait_for_animation
end