Module: BattleUI::PlayerChoiceAbstraction
- Includes:
- GenericChoice
- Included in:
- PlayerChoice, PlayerChoiceSafari
- Defined in:
- docs/5_Battle_01_Scene.rb
Overview
Abstraction helping to design player choice a way that complies to what Visual expect to handle
Instance Attribute Summary collapse
-
#action ⇒ Battle::Actions::Base
readonly
The possible action made by the player (other than choosing a sub action).
-
#index ⇒ Integer
readonly
Get the index.
-
#result ⇒ Symbol?
readonly
The result :attack, :bag, :pokemon, :flee, :cancel, :try_next, :action, :shift :attack = player chooses to attack :bag = player chooses to open the bag :pokemon = player chooses to open the party :flee = player wants to flee from battle :cancel = player cancels, wanting to try something else :action = when the player choice returns an action to use :shift = player wants to shift the current battler.
Instance Method Summary collapse
-
#choice_bait ⇒ Boolean
Set the choice as wanting to throw a bait.
-
#choice_mud ⇒ Boolean
set the choice as wanting to throw mud.
-
#choice_safari_ball ⇒ Boolean
Set the choice as wanting to throw a Safari Ball.
-
#reset
Reset the choice.
-
#shift_pokemon ⇒ Boolean
Force the action to shift a Pokemon.
-
#use_item(item)
Force the action to use an item.
-
#validated? ⇒ Boolean
If the player made a choice.
Instance Attribute Details
#action ⇒ Battle::Actions::Base (readonly)
The possible action made by the player (other than choosing a sub action)
520 521 522 |
# File 'docs/5_Battle_01_Scene.rb', line 520 def action @action end |
#index ⇒ Integer (readonly)
Get the index
523 524 525 |
# File 'docs/5_Battle_01_Scene.rb', line 523 def index @index end |
#result ⇒ Symbol? (readonly)
The result :attack, :bag, :pokemon, :flee, :cancel, :try_next, :action, :shift :attack = player chooses to attack :bag = player chooses to open the bag :pokemon = player chooses to open the party :flee = player wants to flee from battle :cancel = player cancels, wanting to try something else :action = when the player choice returns an action to use :shift = player wants to shift the current battler
517 518 519 |
# File 'docs/5_Battle_01_Scene.rb', line 517 def result @result end |
Instance Method Details
#choice_bait ⇒ Boolean
Set the choice as wanting to throw a bait
581 582 |
# File 'docs/5_Battle_01_Scene.rb', line 581 def choice_bait end |
#choice_mud ⇒ Boolean
set the choice as wanting to throw mud
585 586 |
# File 'docs/5_Battle_01_Scene.rb', line 585 def choice_mud end |
#choice_safari_ball ⇒ Boolean
Set the choice as wanting to throw a Safari Ball
577 578 |
# File 'docs/5_Battle_01_Scene.rb', line 577 def choice_safari_ball end |
#reset
Reset the choice
525 526 |
# File 'docs/5_Battle_01_Scene.rb', line 525 def reset end |
#shift_pokemon ⇒ Boolean
Force the action to shift a Pokemon
537 538 |
# File 'docs/5_Battle_01_Scene.rb', line 537 def shift_pokemon end |
#use_item(item)
Force the action to use an item
533 534 |
# File 'docs/5_Battle_01_Scene.rb', line 533 def use_item(item) end |
#validated? ⇒ Boolean
If the player made a choice
529 530 |
# File 'docs/5_Battle_01_Scene.rb', line 529 def validated? end |