Class: PFM::ContestCreature

Inherits:
Pokemon show all
Defined in:
docs/6_Contest_03_Contest_Creature.rb

Overview

Class defining a Creature during a contest

Constant Summary collapse

COPIED_PROPERTIES =

List of properties to copy

Returns:

  • (Array<Symbol>)
%i[@id @form @ability @given_name @code @hp @trainer_id @trainer_name @step_remaining @status @item_holding @gender @ribbons @character @evolve_var @hp_rate @coolness @beauty @cuteness @cleverness @toughness @sheen]

Constants inherited from Pokemon

Pokemon::ABILITY_CHANCES, Pokemon::ArceusItem, Pokemon::BATTLER_SIZE, Pokemon::EGG_FILENAMES, Pokemon::FLAG_CAUGHT_BY_PLAYER, Pokemon::FLAG_FROM_THIS_GAME, Pokemon::FLAG_PRESENT_TIME, Pokemon::FLAG_UNKOWN_USE, Pokemon::FOOT_SIZE, Pokemon::FORM_CALIBRATE, Pokemon::FORM_GENERATION, Pokemon::G_FORM, Pokemon::G_GR, Pokemon::G_ID, Pokemon::G_MOVE, Pokemon::G_NV, Pokemon::G_OBJ, Pokemon::G_SHINY, Pokemon::G_STAT, Pokemon::GenesectModules, Pokemon::ICON_SIZE, Pokemon::OGERPONMASK, Pokemon::SPECIAL_EVOLUTION_ID, Pokemon::Shiny_IV, Pokemon::SilvallyROM

Instance Attribute Summary collapse

Attributes inherited from Pokemon

#ability, #ability_index, #ability_used, #attack_order, #battle_item, #battle_item_data, #battle_stage, #battle_turns, #beauty, #captured_at, #captured_in, #captured_level, #captured_with, #character, #cleverness, #code, #confuse, #coolness, #critical_modifier, #cuteness, #egg_at, #egg_how_obtained, #egg_in, #ev_atk, #ev_ats, #ev_dfe, #ev_dfs, #ev_hp, #ev_spd, #evolve_var, #exp, #exp_rate, #form, #game_code, #gender, #given_name, #hp, #hp_rate, #id, #item_holding, #iv_atk, #iv_ats, #iv_dfe, #iv_dfs, #iv_hp, #iv_spd, #level, #loyalty, #memo_text, #nature, #pokerus, #position, #prepared_skill, #ribbons, #sheen, #skill_learnt, #skills_set, #status, #status_count, #step_remaining, #sub_code, #sub_form, #sub_id, #title_ribbon, #toughness, #trainer_id, #trainer_name, #type1, #type2, #type3, #unbound

Instance Method Summary collapse

Methods inherited from Pokemon

#ability_db_symbol, #ability_descr, #ability_name, #absofusion, #absofusionned?, #acc_stage, #add_bonus, #add_ev_atk, #add_ev_ats, #add_ev_dfe, #add_ev_dfs, #add_ev_hp, #add_ev_spd, add_evolution_criteria, #add_ribbon, #adjust_hp_to_max_hp, #alive?, #asleep?, #atk, #atk_basis, #atk_modifier, #atk_stage, #ats, #ats_basis, #ats_modifier, #ats_stage, back_filename, back_gif_filename, #ball_color, #ball_image, #ball_sprite, #base_atk, #base_ats, #base_dfe, #base_dfs, #base_exp, #base_hp, #base_spd, #battle_list, #battler_back, #battler_face, #burn?, #calyrex_form, #can_be_asleep?, #can_be_burn?, #can_be_frozen?, #can_be_paralyzed?, #can_be_poisoned?, #can_learn?, #can_learn_skill_at_this_level?, #can_mega_evolve?, #captured_zone_name, #castform_form, #caught_by_player?, #change_acc, #change_atk, #change_ats, #change_dfe, #change_dfs, #change_eva, #change_spd, #change_stat, #character_name, #check_skill_and_learn, #cherrim_form, #contest_conditions, #cramorant_form, #cry, #cure, #current_deerling_form, #data, #db_symbol, #dead?, #decrease_hoopa_days, #decrease_pokerus_days, #dfe, #dfe_basis, #dfe_modifier, #dfe_stage, #dfs, #dfs_basis, #dfs_modifier, #dfs_stage, #dv_modifier, #edit_bonus, #egg?, #egg_finish, #egg_init, #egg_zone_name, #elv_1000steps, #elv_1percent, #elv_99percent, #elv_annihilape, #elv_armulys, #elv_basculin, #elv_blindalys, #elv_demanta, #elv_gimmighoul, #elv_kapoera, #elv_kicklee, #elv_kingambit, #elv_nymphali, #elv_pandarbare, #elv_sepiatroce, #elv_sirfetchd, #elv_toxtricity_amped, #elv_toxtricity_low_key, #elv_tygnon, #elv_ursaring, #encode, #ev_atk_text, #ev_ats_text, #ev_check, #ev_dfe_text, #ev_dfs_text, #ev_hp_text, #ev_modifier, #ev_spd_text, #ev_var, #eva_stage, #evolution_condition_function?, #evolve, #evolve_check, #exp_list, #exp_lvl, #exp_remaining_text, #exp_text, #exp_type, #female?, #find_skill, #flags, #flags=, #flavor_disliked?, #flavor_liked?, #forget_skill, #form_calibrate, #form_generation, #form_name, #form_name_upper, #from_past?, #from_player?, front_filename, front_gif_filename, #front_offset_y, #frozen?, #fully_heal, #genderless?, generate_from_hash, #get_dv_value, #gif_back, #gif_face, #given_name_with_title, #handle_gimmighoul_post_evolution_event, #handle_item_removing_post_evolution_event, #handle_post_evolution_events, #height, #hoopa_form, #hoopa_unbound?, #hp_pokemon_number, #hp_text, #icon, icon_filename, #id_text, #id_text2, #id_text3, #increase_evolve_var, #infect_with_pokerus, #item_db_symbol, #item_hold, #item_name, #iv_atk_text, #iv_ats_text, #iv_dfe_text, #iv_dfs_text, #iv_hp_text, #iv_spd_text, #kami_form, #kyurem_form, #learn_skill, #level_pokemon_number, #level_text, #level_text2, #level_up, #level_up_stat_refresh, #level_up_window_call, #load_skill_from_array, #male?, #max_hp, #max_level, #max_level=, #mega_evolve, #mega_evolved?, missing_resources_error, #modifier_stage, #name, #name_upper, #nature_db_symbol, #nature_id, #nature_text, #necrozma_form, #no_preferences?, #paralyzed?, #poisoned?, #pokerus_affected?, #pokerus_check?, #pokerus_cured?, #pokerus_infected?, #pokerus_remaining_days, #pokerus_strain, #primal_evolve, #primary_data, #rareness, #rareness=, #remindable_skills, #remove_ribbon, #replace_skill_index, #reset_evolve_var, #ribbon?, #separate, #shaymin_form, #shiny=, #shiny?, #shiny_rate, #single_type?, #skill_learnt?, #sleep_check, #spd, #spd_basis, #spd_modifier, #spd_stage, #status?, #status_burn, #status_frozen, #status_paralyze, #status_poison, #status_sleep, #status_toxic, #swap_skills_index, #third_type?, #title?, #to_s, #total_ev, #toxic?, #trainer_id_text, #type?, #type_bug?, #type_dark?, #type_dragon?, #type_electric?, #type_fairy?, #type_fighting?, #type_fire?, #type_flying?, #type_ghost?, #type_grass?, #type_ground?, #type_ice?, #type_normal?, #type_poison?, #type_psychic?, #type_rock?, #type_steel?, #type_water?, #typeless?, #unmega_evolve, #update_ability, #update_loyalty, #weight, #zone_id, #zygarde_form

Methods included from Pokemon::ShedinjaSpecialEvolutionCase

#evolve

Constructor Details

#initialize(scene, original) ⇒ ContestCreature

Create a new ContestCreature from a creature rubocop:disable Lint/MissingSuper

Parameters:



29
30
# File 'docs/6_Contest_03_Contest_Creature.rb', line 29

def initialize(scene, original)
end

Instance Attribute Details

#effects ⇒ Contest::Effects::EffectsHandler (readonly)

Get the effect handler



24
25
26
# File 'docs/6_Contest_03_Contest_Creature.rb', line 24

def effects
  @effects
end

#mega_evolved ⇒ Integer|Boolean (readonly)

Is the Creature Mega-Evolved? Contains the base form Id if it is mega evolved, false otherwise

Returns:

  • (Integer|Boolean)


21
22
23
# File 'docs/6_Contest_03_Contest_Creature.rb', line 21

def mega_evolved
  @mega_evolved
end

#moveset ⇒ Array<Contest::Move> (readonly)

Moveset of the Pokemon

Returns:



15
16
17
# File 'docs/6_Contest_03_Contest_Creature.rb', line 15

def moveset
  @moveset
end

#original ⇒ PFM::Pokemon (readonly)

The original creature

Returns:



12
13
14
# File 'docs/6_Contest_03_Contest_Creature.rb', line 12

def original
  @original
end

#round_histories ⇒ Array<Contest::RoundHistory> (readonly)

Histories of the rounds played

Returns:



18
19
20
# File 'docs/6_Contest_03_Contest_Creature.rb', line 18

def round_histories
  @round_histories
end

#scene ⇒ Contest::Scene

Scene where the creature is shown in

Returns:



9
10
11
# File 'docs/6_Contest_03_Contest_Creature.rb', line 9

def scene
  @scene
end

Instance Method Details

#add_primary_judging_history(score)

Add a new round history for the creature for the primary judging phase

Parameters:

  • score (Integer) —

    the score obtained during the primary judging phase



33
34
# File 'docs/6_Contest_03_Contest_Creature.rb', line 33

def add_primary_judging_history(score)
end

#add_round_history(move, score, combo_executed)

Add a new round history for the creature

Parameters:

  • move (Contest::Move) —

    the move used during the round

  • score (Integer) —

    the score obtained during the round

  • combo_executed (Boolean) —

    whether a combo was successfully executed or not



39
40
# File 'docs/6_Contest_03_Contest_Creature.rb', line 39

def add_round_history(move, score, combo_executed)
end

#condition_level ⇒ Integer

Get the condition level of the creature

Returns:

  • (Integer)


64
65
# File 'docs/6_Contest_03_Contest_Creature.rb', line 64

def condition_level
end

#last_move ⇒ Contest::Move

Get the move used during the last round

Returns:



47
48
# File 'docs/6_Contest_03_Contest_Creature.rb', line 47

def last_move
end

#last_round_history ⇒ Contest::RoundHistory

Get the history of the last round played



43
44
# File 'docs/6_Contest_03_Contest_Creature.rb', line 43

def last_round_history
end

#modify_last_round_score(score)

Note:

The score is given as a number of hearts, each heart being worth 20 points.

Modify the score of the last round played

Parameters:

  • score (Integer) —

    the score to add to the last round's score



52
53
# File 'docs/6_Contest_03_Contest_Creature.rb', line 52

def modify_last_round_score(score)
end

#player_creature? ⇒ Boolean

Check if the creature is controlled by the player

Returns:

  • (Boolean)


60
61
# File 'docs/6_Contest_03_Contest_Creature.rb', line 60

def player_creature?
end

#skip_turn? ⇒ Boolean

Check if the creature should skip its turn

Returns:

  • (Boolean)


68
69
# File 'docs/6_Contest_03_Contest_Creature.rb', line 68

def skip_turn?
end

#total_score ⇒ Integer

Get the total score of the creature

Returns:

  • (Integer)


56
57
# File 'docs/6_Contest_03_Contest_Creature.rb', line 56

def total_score
end