Class: BattleUI::SkillChoice

Inherits:
GenericChoice show all
Includes:
SkillChoiceAbstraction
Defined in:
scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00300 SkillChoice.rb

Overview

Class that allow to choose the skill of the Pokemon

The object tells the player validated on #validated? and the result is stored inside #result

The object should be updated through #update otherwise no validation is possible

When result was taken, the scene should call #reset to undo the validated state

Defined Under Namespace

Classes: MoveButton, MoveDescription, MoveInfo, SpecialButton, SubChoice

Constant Summary collapse

BUTTON_COORDINATE =

Coordinate of each buttons

[[198, 124], [198, 153], [198, 182], [198, 211]]

Constants inherited from GenericChoice

GenericChoice::CURSOR_OFFSET_X, GenericChoice::CURSOR_OFFSET_Y

Constants inherited from UI::SpriteStack

UI::SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary

Attributes included from SkillChoiceAbstraction

#index, #mega_enabled, #pokemon, #result

Attributes inherited from GenericChoice

#animation_handler, #scene

Attributes inherited from UI::SpriteStack

#animated, #data, #moving, #stack, #viewport, #x, #y

Instance Method Summary collapse

Methods included from SkillChoiceAbstraction

#reset, #validated?

Methods inherited from GenericChoice

#done?, #reset, #update

Methods included from GoingInOut

#animation_handler, #go_in, #go_out, #in?, #out?

Methods included from HideShow

#animation_handler, #hide, #show

Methods inherited from UI::SpriteStack

#[], #add_background, #add_line, #add_text, #anime, #anime_delta_set, #dispose, #each, #execute_anime, #move, #move_to, #opacity, #opacity=, #push, #push_sprite, #set_origin, #set_position, #simple_mouse_in?, #size, #stop_animation, #translate_mouse_coords, #update, #update_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=

Constructor Details

#initialize(viewport, scene) ⇒ SkillChoice

Create a new SkillChoice UI

Parameters:



17
18
19
20
21
22
23
24
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00300 SkillChoice.rb', line 17

def initialize(viewport, scene)
  # List of last index according to the pokemon that was used
  # @type [Hash{ PFM::PokemonBattler => Integer }]
  @last_indexes = {}
  @mega_enabled = false
  @super_reset = true
  super(viewport, scene)
end