Module: Battle::VisualMock
- Defined in:
- scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.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
-
.extended(mod)
Method called when a visual gets mocked (through extend).
Instance Method Summary collapse
-
#hide_team_info
Hide team info.
-
#lock
Lock the battle scene.
-
#refresh_info_bar(pokemon)
Refresh a specific bar (when Pokemon loses HP or change state).
-
#set_info_state(state, pokemon = nil)
Set the state info.
-
#show_ability(target)
Show the ability animation.
-
#show_exp_distribution(exp_data)
Show the exp distribution.
-
#show_hp_animations(targets, hps, effectiveness = [], &messages)
Show HP animations.
-
#show_item(target)
Show the item user animation.
-
#show_move_animation(user, targets, move)
Make a move animation.
-
#show_pokemon_choice(forced = false) ⇒ PFM::PokemonBattler?
Method that show the pokemon choice.
-
#show_rmxp_animation(target, id)
Show a dedicated animation.
-
#show_switch_form_animation(target)
Show the pokemon switch form animation.
-
#wait_for_animation
Wait for all animation to end (non parallel one).
Class Method Details
.extended(mod)
Method called when a visual gets mocked (through extend)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 9 def extended(mod) mod.instance_variable_set(:@screenshot, nil) mod.instance_variable_set(:@viewport, nil) mod.instance_variable_set(:@viewport_sub, nil) mod.instance_variable_set(:@battlers, {}) mod.instance_variable_set(:@info_bars, {}) mod.instance_variable_set(:@team_info, {}) mod.instance_variable_set(:@ability_bars, {}) mod.instance_variable_set(:@item_bars, {}) mod.instance_variable_set(:@item_bars, {}) mod.instance_variable_set(:@animations, []) mod.instance_variable_set(:@animatable, []) mod.instance_variable_set(:@parallel_animations, {}) mod.instance_variable_set(:@to_dispose, []) mod.instance_variable_set(:@locking, false) end |
Instance Method Details
#hide_team_info
Hide team info
103 104 105 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 103 def hide_team_info return end |
#lock
Lock the battle scene
28 29 30 31 32 33 34 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 28 def lock if block_given? @locking = true yield return @locking = false end end |
#refresh_info_bar(pokemon)
Refresh a specific bar (when Pokemon loses HP or change state)
71 72 73 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 71 def (pokemon) return end |
#set_info_state(state, pokemon = nil)
Set the state info
93 94 95 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 93 def set_info_state(state, pokemon = nil) return end |
#show_ability(target)
Show the ability animation
38 39 40 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 38 def show_ability(target) return end |
#show_exp_distribution(exp_data)
Show the exp distribution
44 45 46 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 44 def show_exp_distribution(exp_data) return end |
#show_hp_animations(targets, hps, effectiveness = [], &messages)
Show HP animations
80 81 82 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 80 def show_hp_animations(targets, hps, effectiveness = [], &) return end |
#show_item(target)
Show the item user animation
65 66 67 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 65 def show_item(target) return end |
#show_move_animation(user, targets, move)
Make a move animation
111 112 113 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 111 def show_move_animation(user, targets, move) return end |
#show_pokemon_choice(forced = false) ⇒ PFM::PokemonBattler?
Method that show the pokemon choice
51 52 53 54 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 51 def show_pokemon_choice(forced = false) log_error("show_pokemon_choice was called inside mock by #{caller[0]}") return end |
#show_rmxp_animation(target, id)
Show a dedicated animation
59 60 61 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 59 def show_rmxp_animation(target, id) return end |
#show_switch_form_animation(target)
Show the pokemon switch form animation
86 87 88 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 86 def show_switch_form_animation(target) return end |
#wait_for_animation
Wait for all animation to end (non parallel one)
98 99 100 |
# File 'scripts/01600 Alpha 25 Battle Engine/08000 Battle_AI/00002 BattleVisualMock.rb', line 98 def wait_for_animation return end |