Class: Battle::Safari

Inherits:
Scene show all
Defined in:
docs/5_Battle_01_Scene.rb

Overview

Safari battles scene

Constant Summary

Constants inherited from Scene

Battle::Scene::SPEED_UP_ALLOWED, Battle::Scene::SPEED_UP_FACTOR, Battle::Scene::SPEED_UP_KEY

Constants inherited from GamePlay::Base

GamePlay::Base::DEFAULT_TRANSITION, GamePlay::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 GamePlay::DisplayMessage

GamePlay::DisplayMessage::MESSAGE_ERROR, GamePlay::DisplayMessage::MESSAGE_PROCESS_ERROR

Instance Attribute Summary collapse

Attributes inherited from Scene

#artificial_intelligences, #battle_info, #logic, #message_window, #next_update, #player_actions, #visual

Attributes inherited from GamePlay::Base

#__last_scene, #__result_process, #clock, #running, #viewport

Attributes included from GamePlay::DisplayMessage

#message_window

Instance Method Summary collapse

Methods inherited from Scene

#dispose, #force_ia_switch?, #main_begin, #next_update_process, #on_after_attack, #on_battle_turn_end, #on_pre_battle_begin, register_event, #snap_to_bitmap, #to_s, #update

Methods inherited from GamePlay::Base

#add_disposable, #call_scene, #dispose, #find_parent, #main, #return_to_scene, #snap_to_bitmap, #update, #visible, #visible=

Methods included from Input

clear, close_virtual_keyboard, dir4, dir8, get_text, joy_axis_position, load_touch_screen, open_virtual_keyboard, press?, register_events, released?, repeat?, swap_states, trigger?

Methods included from GamePlay::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(battle_info) ⇒ Safari

Initialisation for Safari battle scene



318
319
# File 'docs/5_Battle_01_Scene.rb', line 318

def initialize(battle_info)
end

Instance Attribute Details

#catch_rate_modifier ⇒ Integer

Stage modifying a Pokemon's catch rate

Returns:

  • (Integer)


313
314
315
# File 'docs/5_Battle_01_Scene.rb', line 313

def catch_rate_modifier
  @catch_rate_modifier
end

#flee_rate_modifier ⇒ Integer

Stage modifying a Pokemon's flee chance

Returns:

  • (Integer)


316
317
318
# File 'docs/5_Battle_01_Scene.rb', line 316

def flee_rate_modifier
  @flee_rate_modifier
end

#safari_pokemon ⇒ PokemonBattler

The current Safari Pokémon shown in the battle scene

Returns:

  • (PokemonBattler)


310
311
312
# File 'docs/5_Battle_01_Scene.rb', line 310

def safari_pokemon
  @safari_pokemon
end

Instance Method Details

#battle_continues_message

Get the message shown when the Safari Pokemon does not flee and the battle continues



370
371
# File 'docs/5_Battle_01_Scene.rb', line 370

def battle_continues_message
end

#caught(item_wrapper)

Method to catch a Pokémon

Parameters:



346
347
# File 'docs/5_Battle_01_Scene.rb', line 346

def caught(item_wrapper)
end

#flee

Method that makes the player flee the battle, no verification needed in Safari battles



349
350
# File 'docs/5_Battle_01_Scene.rb', line 349

def flee
end

#modifier_stage(stage) ⇒ Float

Return the stage modifier (multiplier)

Parameters:

  • stage (Integer) —

    the value of the stage

Returns:

  • (Float) —

    the multiplier



342
343
# File 'docs/5_Battle_01_Scene.rb', line 342

def modifier_stage(stage)
end

#player_action_choice

Method that ask for the player choice (it calls @visual.show_player_choice)



321
322
# File 'docs/5_Battle_01_Scene.rb', line 321

def player_action_choice
end

#player_action_choice_internal(choice)

React to the player's choice

Parameters:

  • choice (Symbol) —

    :safari_ball, :bait, :mud, :flee



325
326
# File 'docs/5_Battle_01_Scene.rb', line 325

def player_action_choice_internal(choice)
end

#pokemon_flee_message

Get the message shown when the Safari Pokemon flees



367
368
# File 'docs/5_Battle_01_Scene.rb', line 367

def pokemon_flee_message
end

#pokemon_turn

Engage the turn of the wild Pokemon, check if it flees or if the battle proceeds



352
353
# File 'docs/5_Battle_01_Scene.rb', line 352

def pokemon_turn
end

#ten_percent_bait_message

Get the message shown when throwing a bait and the flee rate is not increased



361
362
# File 'docs/5_Battle_01_Scene.rb', line 361

def ten_percent_bait_message
end

#ten_percent_mud_message

Get the message shown when throwing mud and the catch rate is not decreased



364
365
# File 'docs/5_Battle_01_Scene.rb', line 364

def ten_percent_mud_message
end

#throw_bait

Throw a bait at the Pokémon, increasing its catch rate modifier by 1. Also has a 90% chance of increasing its flee rate modifier by 1 In case the flee rate modifier is not increased, a special message is shown



329
330
# File 'docs/5_Battle_01_Scene.rb', line 329

def throw_bait
end

#throw_bait_message

Get the message shown when throwing a bait



355
356
# File 'docs/5_Battle_01_Scene.rb', line 355

def throw_bait_message
end

#throw_mud

Throw mud at the Pokémon, decreasing its flee rate modifier by 1. Also has a 90% chance of decreasing its catch rate modifier by 1 In case the catch rate modifier is not decreased, a special message is shown



333
334
# File 'docs/5_Battle_01_Scene.rb', line 333

def throw_mud
end

#throw_mud_message

Get the message shown when throwing mud



358
359
# File 'docs/5_Battle_01_Scene.rb', line 358

def throw_mud_message
end

#try_safari_catch

Try to send a Safari Ball to catch the Pokémon If the player has no Safari Balls left, the battle ends



337
338
# File 'docs/5_Battle_01_Scene.rb', line 337

def try_safari_catch
end