Module: BattleUI::PlayerChoiceAbstraction

Includes:
GenericChoice
Included in:
PlayerChoice
Defined in:
docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb

Overview

Abstraction helping to design player choice a way that complies to what Visual expect to handle

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionBattle::Actions::Base (readonly)

The possible action made by the player (other than choosing a sub action)



426
427
428
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 426

def action
  @action
end

#indexInteger (readonly)

Get the index

Returns:

  • (Integer)


429
430
431
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 429

def index
  @index
end

#resultSymbol? (readonly)

The result :attack, :bag, :pokemon, :flee, :cancel, :try_next, :action

Returns:

  • (Symbol, nil)


423
424
425
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 423

def result
  @result
end

Instance Method Details

#reset(can_switch)

Reset the choice

Parameters:

  • can_switch (Boolean)


432
433
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 432

def reset(can_switch)
end

#use_item(item)

Force the action to use an item

Parameters:



440
441
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 440

def use_item(item)
end

#validated?Boolean

If the player made a choice

Returns:

  • (Boolean)


436
437
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 436

def validated?
end