Class: GamePlay::Party_Menu
- Inherits:
-
BaseCleanUpdate::FrameBalanced
- Object
- Base
- BaseCleanUpdate
- BaseCleanUpdate::FrameBalanced
- GamePlay::Party_Menu
- Includes:
- PartyMenuMixin, Util::GiveTakeItem
- Defined in:
- docs/4_Systems_102_Party.rb
Overview
Class that display the Party Menu interface and manage user inputs
This class has several modes
- :map => Used to select a Pokemon in order to perform stuff
- :menu => The normal mode when opening this interface from the menu
- :battle => Select a Pokemon to send to battle
- :item => Select a Pokemon in order to use an item on it (require extend data : hash)
- :hold => Give an item to the Pokemon (requires extend data : item_id)
- :select => Select a number of Pokemon for a temporary team.
(Number defined by $game_variables[6] and possible list of excluded Pokemon requires extend data : array)
This class can also show an other party than the player party, the party paramter is an array of Pokemon upto 6 Pokemon
Constant Summary collapse
- ON_POKEMON_CHOICE_COLOR_MAPPING =
Color mapping for the result of on_creature_choice
{true => 1, false => 2, nil => 3}
- ON_POKEMON_CHOICE_MESSAGE_MAPPING =
Message mapping for the result of on_creature_choice in apt detect
{true => 143, false => 144, nil => 142}
- SelectorRect =
Selector Rect info
[[0, 0, 132, 52], [0, 64, 132, 52]]
- FRAME_HEIGHT =
Height of the frame Image to actually display (to prevent button from being hidden / shadowed). Set nil to keep the full height
214
- Actions =
Array of actions to do according to the pressed button
%i[action_A action_X action_Y action_B]
- CHOICE_METHODS =
List of all choice method to call according to the current mode
{menu: :show_menu_mode_choice, choice: :show_choice_mode_choice, battle: :show_battle_mode_choice, item: :show_item_mode_choice, hold: :show_hold_mode_choice, select: :show_select_mode_choice, absofusion: :process_absofusion_mode, separate: :process_separate_mode}
Constants inherited from BaseCleanUpdate
BaseCleanUpdate::AIU_KEY2METHOD
Constants inherited from Base
Base::DEFAULT_TRANSITION, Base::DEFAULT_TRANSITION_PARAMETER
Constants included from Input
Input::ALIAS_KEYS, Input::AXIS_MAPPING, Input::AXIS_SENSITIVITY, Input::DEAD_ZONE, Input::Keyboard, Input::Keys, Input::NON_TRIGGER_ZONE, Input::REPEAT_COOLDOWN, Input::REPEAT_SPACE
Constants included from DisplayMessage
DisplayMessage::MESSAGE_ERROR, DisplayMessage::MESSAGE_PROCESS_ERROR
Instance Attribute Summary
Attributes included from PartyMenuMixin
#call_skill_process, #return_data
Attributes inherited from Base
#__last_scene, #__result_process, #running, #viewport
Attributes included from DisplayMessage
Instance Method Summary collapse
-
#action_A
Action triggered when A is pressed.
-
#action_A_menu
Action when A is pressed and the mode is menu.
-
#action_B
Action triggered when B is pressed.
-
#action_move_current_pokemon
Select the current pokemon to move with an other pokemon.
-
#action_X
Action triggered when X is pressed.
-
#action_Y
Action triggered when Y is pressed.
-
#check_select_mon_var
Check if the $game_variables’s value is between 1 and 6 If not, call action_B to exit to map return Boolean.
-
#current_pokemon_has_no_item ⇒ Boolean
Method telling if the Pokemon has no item or not.
-
#deselect_follower
Action of deselecting the follower.
-
#enough_pokemon?(caller = :validate) ⇒ Boolean
Check if the temporary team contains the right number of Pokemon return Boolean.
-
#get_choice_coordinates(choices) ⇒ Array(Integer, Integer)
Return the choice coordinates according to the current selected Pokemon.
-
#give_item(item2 = -1))
Action of giving an item to the Pokemon.
-
#initialize(party, mode = :map, extend_data = nil, no_leave: false) ⇒ Party_Menu
constructor
Create a new Party_Menu.
-
#launch_reminder(mode = 0)
Action of launching the Pokemon Reminder.
-
#launch_summary(mode = :view, extend_data = nil)
Action of launching the Pokemon Summary.
-
#no_leave_B ⇒ Boolean
Function that detect no_leave and forbit the B action to process.
-
#on_item_give_choice
Event that triggers when the player choose on which pokemon to give the item.
-
#on_item_use_choice
Event that triggers when the player choose on which pokemon to use the item.
-
#on_map_choice
Event that triggers when the player has choosen a Pokemon.
-
#on_select
Event that triggers when a Pokemon is selected in :select mode.
-
#on_send_pokemon
When the player want to send a specific Pokemon to battle.
-
#on_skill_choice
Event that triggers when the player choose on which pokemon to apply the move.
-
#process_absofusion_mode
Process the fusion when the party is in mode :absofusion.
-
#process_item_switch
Process the switch between the items of two pokemon.
-
#process_separate_mode
Process the separation when the party is in mode :separate.
-
#process_switch
Process the switch between two pokemon.
-
#select_follower
Action of selecting the follower.
-
#show_battle_mode_choice
Show the choice when the party is in mode :battle.
-
#show_choice
Show the proper choice.
-
#show_choice_mode_choice
Show the choice when the party is in mode :choice.
-
#show_hold_mode_choice
Show the choice when the party is in mode :hold.
-
#show_item_mode_choice
Show the choice when the party is in mode :item.
-
#show_map_mode_choice
Show the choice when the party is in mode :map.
-
#show_menu_mode_choice
Show the choice when party is in mode :menu.
-
#show_select_mode_choice
Show the choice when the party is in mode :select.
-
#skill_color ⇒ Integer
Return the skill color.
-
#take_item
Action of taking the item from the Pokemon.
-
#update_graphics
(also: #update_during_process)
Update the scene graphics during an animation or something else.
-
#update_inputs
Update the inputs.
-
#update_menu_choice(choices)
Update the scene during a choice.
-
#update_mouse(_moved)
Update the mouse.
-
#update_mouse_ctrl
Update the mouse interaction with the ctrl buttons.
-
#update_mouse_selector_move
Update the movement of the selector with the mouse.
-
#update_selector_coordinates
Update the selector coordinates.
-
#update_selector_move
Update the movement of the Cursor.
-
#use_pokemon_skill(move_index)
Action of using a move of the current Pokemon.
Methods included from Util::GiveTakeItem
#givetake_give_egg_message, #givetake_give_item, #givetake_give_item_message, #givetake_give_item_update_state, #givetake_take_item
Methods included from PartyMenuMixin
#party_selected?, #pokemon_selected?, #selected_pokemons
Methods inherited from BaseCleanUpdate::FrameBalanced
Methods included from Graphics::FPSBalancer::Marker
Methods inherited from BaseCleanUpdate
#automatic_input_update, #update
Methods inherited from Base
#add_disposable, #call_scene, #dispose, #find_parent, #main, #return_to_scene, #snap_to_bitmap, #update, #visible, #visible=
Methods included from Input
dir4, dir8, get_text, joy_axis_position, press?, register_events, released?, repeat?, swap_states, trigger?
Methods included from DisplayMessage
#can_display_message_be_called?, #close_message_window, #display_message, #display_message_and_wait, #message_class, #message_processing?, #message_visible, #message_visible=
Constructor Details
#initialize(party, mode = :map, extend_data = nil, no_leave: false) ⇒ Party_Menu
Create a new Party_Menu
503 504 |
# File 'docs/4_Systems_102_Party.rb', line 503 def initialize(party, mode = :map, extend_data = nil, no_leave: false) end |
Instance Method Details
#action_A
Action triggered when A is pressed
573 574 |
# File 'docs/4_Systems_102_Party.rb', line 573 def action_A end |
#action_A_menu
Action when A is pressed and the mode is menu
576 577 |
# File 'docs/4_Systems_102_Party.rb', line 576 def end |
#action_B
Action triggered when B is pressed
579 580 |
# File 'docs/4_Systems_102_Party.rb', line 579 def action_B end |
#action_move_current_pokemon
Select the current pokemon to move with an other pokemon
604 605 |
# File 'docs/4_Systems_102_Party.rb', line 604 def action_move_current_pokemon end |
#action_X
Action triggered when X is pressed
586 587 |
# File 'docs/4_Systems_102_Party.rb', line 586 def action_X end |
#action_Y
Action triggered when Y is pressed
589 590 |
# File 'docs/4_Systems_102_Party.rb', line 589 def action_Y end |
#check_select_mon_var
Check if the $game_variables’s value is between 1 and 6 If not, call action_B to exit to map return Boolean
698 699 |
# File 'docs/4_Systems_102_Party.rb', line 698 def check_select_mon_var end |
#current_pokemon_has_no_item ⇒ Boolean
Method telling if the Pokemon has no item or not
658 659 |
# File 'docs/4_Systems_102_Party.rb', line 658 def current_pokemon_has_no_item end |
#deselect_follower
Action of deselecting the follower
643 644 |
# File 'docs/4_Systems_102_Party.rb', line 643 def deselect_follower end |
#enough_pokemon?(caller = :validate) ⇒ Boolean
Check if the temporary team contains the right number of Pokemon return Boolean
693 694 |
# File 'docs/4_Systems_102_Party.rb', line 693 def enough_pokemon?(caller = :validate) end |
#get_choice_coordinates(choices) ⇒ Array(Integer, Integer)
Return the choice coordinates according to the current selected Pokemon
627 628 |
# File 'docs/4_Systems_102_Party.rb', line 627 def get_choice_coordinates(choices) end |
#give_item(item2 = -1))
if item2 is -1 it’ll call the Bag interface to get the item
Action of giving an item to the Pokemon
651 652 |
# File 'docs/4_Systems_102_Party.rb', line 651 def give_item(item2 = -1) end |
#launch_reminder(mode = 0)
Action of launching the Pokemon Reminder
640 641 |
# File 'docs/4_Systems_102_Party.rb', line 640 def launch_reminder(mode = 0) end |
#launch_summary(mode = :view, extend_data = nil)
Action of launching the Pokemon Summary
636 637 |
# File 'docs/4_Systems_102_Party.rb', line 636 def launch_summary(mode = :view, extend_data = nil) end |
#no_leave_B ⇒ Boolean
Function that detect no_leave and forbit the B action to process
583 584 |
# File 'docs/4_Systems_102_Party.rb', line 583 def no_leave_B end |
#on_item_give_choice
Event that triggers when the player choose on which pokemon to give the item
682 683 |
# File 'docs/4_Systems_102_Party.rb', line 682 def on_item_give_choice end |
#on_item_use_choice
Event that triggers when the player choose on which pokemon to use the item
676 677 |
# File 'docs/4_Systems_102_Party.rb', line 676 def on_item_use_choice end |
#on_map_choice
Event that triggers when the player has choosen a Pokemon
704 705 |
# File 'docs/4_Systems_102_Party.rb', line 704 def on_map_choice end |
#on_select
Event that triggers when a Pokemon is selected in :select mode
688 689 |
# File 'docs/4_Systems_102_Party.rb', line 688 def on_select end |
#on_send_pokemon
When the player want to send a specific Pokemon to battle
664 665 |
# File 'docs/4_Systems_102_Party.rb', line 664 def on_send_pokemon end |
#on_skill_choice
Event that triggers when the player choose on which pokemon to apply the move
670 671 |
# File 'docs/4_Systems_102_Party.rb', line 670 def on_skill_choice end |
#process_absofusion_mode
Process the fusion when the party is in mode :absofusion
713 714 |
# File 'docs/4_Systems_102_Party.rb', line 713 def process_absofusion_mode end |
#process_item_switch
Process the switch between the items of two pokemon
710 711 |
# File 'docs/4_Systems_102_Party.rb', line 710 def process_item_switch end |
#process_separate_mode
Process the separation when the party is in mode :separate
716 717 |
# File 'docs/4_Systems_102_Party.rb', line 716 def process_separate_mode end |
#process_switch
Process the switch between two pokemon
707 708 |
# File 'docs/4_Systems_102_Party.rb', line 707 def process_switch end |
#select_follower
Action of selecting the follower
646 647 |
# File 'docs/4_Systems_102_Party.rb', line 646 def select_follower end |
#show_battle_mode_choice
Show the choice when the party is in mode :battle
661 662 |
# File 'docs/4_Systems_102_Party.rb', line 661 def show_battle_mode_choice end |
#show_choice
Show the proper choice
611 612 |
# File 'docs/4_Systems_102_Party.rb', line 611 def show_choice end |
#show_choice_mode_choice
Show the choice when the party is in mode :choice
667 668 |
# File 'docs/4_Systems_102_Party.rb', line 667 def show_choice_mode_choice end |
#show_hold_mode_choice
Show the choice when the party is in mode :hold
679 680 |
# File 'docs/4_Systems_102_Party.rb', line 679 def show_hold_mode_choice end |
#show_item_mode_choice
Show the choice when the party is in mode :item
673 674 |
# File 'docs/4_Systems_102_Party.rb', line 673 def show_item_mode_choice end |
#show_map_mode_choice
Show the choice when the party is in mode :map
701 702 |
# File 'docs/4_Systems_102_Party.rb', line 701 def show_map_mode_choice end |
#show_menu_mode_choice
Show the choice when party is in mode :menu
618 619 |
# File 'docs/4_Systems_102_Party.rb', line 618 def end |
#show_select_mode_choice
Show the choice when the party is in mode :select
685 686 |
# File 'docs/4_Systems_102_Party.rb', line 685 def show_select_mode_choice end |
#skill_color ⇒ Integer
Return the skill color
615 616 |
# File 'docs/4_Systems_102_Party.rb', line 615 def skill_color end |
#take_item
Action of taking the item from the Pokemon
654 655 |
# File 'docs/4_Systems_102_Party.rb', line 654 def take_item end |
#update_graphics Also known as: update_during_process
Update the scene graphics during an animation or something else
513 514 |
# File 'docs/4_Systems_102_Party.rb', line 513 def update_graphics end |
#update_inputs
Update the inputs
506 507 |
# File 'docs/4_Systems_102_Party.rb', line 506 def update_inputs end |
#update_menu_choice(choices)
Update the scene during a choice
622 623 |
# File 'docs/4_Systems_102_Party.rb', line 622 def (choices) end |
#update_mouse(_moved)
Update the mouse
510 511 |
# File 'docs/4_Systems_102_Party.rb', line 510 def update_mouse(_moved) end |
#update_mouse_ctrl
Update the mouse interaction with the ctrl buttons
592 593 |
# File 'docs/4_Systems_102_Party.rb', line 592 def update_mouse_ctrl end |
#update_mouse_selector_move
Update the movement of the selector with the mouse
598 599 |
# File 'docs/4_Systems_102_Party.rb', line 598 def update_mouse_selector_move end |
#update_selector_coordinates
Update the selector coordinates
601 602 |
# File 'docs/4_Systems_102_Party.rb', line 601 def update_selector_coordinates(*) end |
#update_selector_move
Update the movement of the Cursor
595 596 |
# File 'docs/4_Systems_102_Party.rb', line 595 def update_selector_move end |
#use_pokemon_skill(move_index)
Action of using a move of the current Pokemon
631 632 |
# File 'docs/4_Systems_102_Party.rb', line 631 def use_pokemon_skill(move_index) end |