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:



42
43
# File 'docs/5_Battle_30_AI.rb', line 42

def extended(mod)
end

Instance Method Details

#hide_team_info

Hide team info



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

def hide_team_info
end

#lock

Lock the battle scene



46
47
# File 'docs/5_Battle_30_AI.rb', line 46

def lock
end

#refresh_info_bar(pokemon)

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

Parameters:



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

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)



88
89
# File 'docs/5_Battle_30_AI.rb', line 88

def set_info_state(state, pokemon = nil)
end

#show_ability(target)

Show the ability animation

Parameters:



50
51
# File 'docs/5_Battle_30_AI.rb', line 50

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



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

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



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

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

#show_item(target)

Show the item user animation

Parameters:



68
69
# File 'docs/5_Battle_30_AI.rb', line 68

def show_item(target)
end

#show_move_animation(user, targets, move)

Make a move animation

Parameters:



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

def show_move_animation(user, targets, move)
end

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

Method that show the pokemon choice

Parameters:

  • forced (Boolean) (defaults to: false)

Returns:



59
60
# File 'docs/5_Battle_30_AI.rb', line 59

def show_pokemon_choice(forced = false)
end

#show_rmxp_animation(target, id)

Show a dedicated animation

Parameters:



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

def show_rmxp_animation(target, id)
end

#show_switch_form_animation(target)

Show the pokemon switch form animation

Parameters:



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

def show_switch_form_animation(target)
end

#wait_for_animation

Wait for all animation to end (non parallel one)



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

def wait_for_animation
end