Class: Contest::Logic::ContestInfo

Inherits:
Object
  • Object
show all
Defined in:
docs/6_Contest_04_Logic.rb

Overview

Class describing the information about the contest

Constant Summary collapse

DEFAULT_CONTEST_BGM =

TODO: add the BGMs to Studio sound design config Default BGM

Returns:

  • (Array)
['audio/bgm/oras_pokemon_contest', 100, 100]
DEFAULT_CONTEST_RESULTS_BGM =

Default BGM during results phase

Returns:

  • (Array)
['audio/bgm/oras_pokemon_contest_result', 100, 100]
DEFAULT_CONTEST_WINNER_BGM =

Default BGM during winner announcement phase

Returns:

  • (Array)
['audio/bgm/oras_pokemon_contest_winner', 100, 100]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(creature_position, coordinator1_id, coordinator2_id, coordinator3_id, rank, condition) ⇒ ContestInfo

Create a new Contest Info

Parameters:

  • creature_position (Integer) —

    position of the creature in the party (0-5) that will be the player's contestant

  • coordinator1_id (Integer) —

    ID of the first coordinator

  • coordinator2_id (Integer) —

    ID of the second coordinator

  • coordinator3_id (Integer) —

    ID of the third coordinator

  • rank (Symbol) —

    rank of the contest

  • condition (Symbol) —

    condition of the contest



241
242
# File 'docs/6_Contest_04_Logic.rb', line 241

def initialize(creature_position, coordinator1_id, coordinator2_id, coordinator3_id, rank, condition)
end

Instance Attribute Details

#ai_levels ⇒ Array<Integer> (readonly)

List of AI levels

Returns:

  • (Array<Integer>)


224
225
226
# File 'docs/6_Contest_04_Logic.rb', line 224

def ai_levels
  @ai_levels
end

#condition ⇒ Symbol (readonly)

Contest condition

Returns:

  • (Symbol)


227
228
229
# File 'docs/6_Contest_04_Logic.rb', line 227

def condition
  @condition
end

#contestants ⇒ Array<PFM::Pokemon> (readonly)

List of creature contestants

Returns:



218
219
220
# File 'docs/6_Contest_04_Logic.rb', line 218

def contestants
  @contestants
end

#coordinator_sprites ⇒ Array<String> (readonly)

List of the contestants sprites

Returns:



221
222
223
# File 'docs/6_Contest_04_Logic.rb', line 221

def coordinator_sprites
  @coordinator_sprites
end

#mega_coordinators ⇒ Array<Boolean> (readonly)

List of coordinators' ability to Mega-evolve their creature

Returns:

  • (Array<Boolean>)


233
234
235
# File 'docs/6_Contest_04_Logic.rb', line 233

def mega_coordinators
  @mega_coordinators
end

#names ⇒ Array<String> (readonly)

List of the names of the coordinators

Returns:



215
216
217
# File 'docs/6_Contest_04_Logic.rb', line 215

def names
  @names
end

#rank ⇒ Symbol (readonly)

Contest rank

Returns:

  • (Symbol)


230
231
232
# File 'docs/6_Contest_04_Logic.rb', line 230

def rank
  @rank
end

Instance Method Details

#contest_bgm ⇒ Array

Get the music played during a contest It can be changed by specifying a file when starting a contest, otherwise it plays the default music

Returns:

  • (Array)


256
257
# File 'docs/6_Contest_04_Logic.rb', line 256

def contest_bgm
end

#contest_results_bgm ⇒ Array

Get the music played during the results phase of a contest

Returns:

  • (Array)


260
261
# File 'docs/6_Contest_04_Logic.rb', line 260

def contest_results_bgm
end

#contest_winner_bgm ⇒ Array

Get the music played during the winner announcement phase of a contest

Returns:

  • (Array)


264
265
# File 'docs/6_Contest_04_Logic.rb', line 264

def contest_winner_bgm
end

#contestant_index(contestant) ⇒ Integer

Find the index of a contestant in the contestants array

Parameters:

Returns:

  • (Integer)


251
252
# File 'docs/6_Contest_04_Logic.rb', line 251

def contestant_index(contestant)
end

#coordinator_name(contestant) ⇒ String

Get the coordinator name of a contestant

Parameters:

Returns:



246
247
# File 'docs/6_Contest_04_Logic.rb', line 246

def coordinator_name(contestant)
end