Class: Object

Inherits:
BasicObject
Defined in:
docs/00000_a_root.rb,
docs/00800_Studio.rb,
docs/00700_Ajout_PSDK.rb,
docs/00000_Dependencies.rb,
docs/01450_Systems_00000_General.rb

Overview

Ruby Object class

Constant Summary collapse

EMPTY_OPTIONAL =

Array representing an empty optional key hash

[].freeze
VALIDATE_PARAM_ERROR =

Default error message

'Parameter %<param_name>s sent to %<method_name>s is incorrect : %<reason>s'
EXC_MSG =

Exception message

'Invalid param value passed to %s#%s, see previous errors to know what are the invalid params'

Instance Method Summary collapse

Instance Method Details

#_clean_name_utf8(arr) ⇒ arr

Clean an array containing object responding to #name (force utf-8)

Parameters:

  • arr (Array<#name>)

Returns:

  • (arr)


164
165
# File 'docs/00700_Ajout_PSDK.rb', line 164

def _clean_name_utf8(arr)
end

#bchance?(rate, logic = nil) ⇒ Boolean

Attempt to get for the battles

Parameters:

  • rate (Float)

    number between 0 & 1 telling how much chance we have

  • logic (Battle::Logic) (defaults to: nil)

Returns:

  • (Boolean)


361
362
# File 'docs/01450_Systems_00000_General.rb', line 361

def bchance?(rate, logic = nil)
end

#ext_text(file_id, text_id) ⇒ String

Get a text front the external text database

Parameters:

  • file_id (Integer)

    ID of the text file

  • text_id (Integer)

    ID of the text in the file

Returns:



170
171
# File 'docs/00700_Ajout_PSDK.rb', line 170

def ext_text(file_id, text_id)
end

#help

Method that shows the help



124
125
# File 'docs/00700_Ajout_PSDK.rb', line 124

def help
end

#parse_text(file_id, text_id, additionnal_var = nil) ⇒ String

Parse a text from the text database with specific informations

Parameters:

  • file_id (Integer)

    ID of the text file

  • text_id (Integer)

    ID of the text in the file

  • additionnal_var (nil, Hash{String => String}) (defaults to: nil)

    additional remplacements in the text

Returns:

  • (String)

    the text parsed and ready to be displayed



148
149
# File 'docs/00700_Ajout_PSDK.rb', line 148

def parse_text(file_id, text_id, additionnal_var = nil)
end

#parse_text_with_2pokemon(file_id, text_id, pokemon1, pokemon2, additionnal_var = nil) ⇒ String

Parse a text from the text database with 2 pokemon & specific information

Parameters:

  • file_id (Integer)

    ID of the text file

  • text_id (Integer)

    ID of the text in the file

  • pokemon1 (PFM::Pokemon)

    pokemon we’re talking about

  • pokemon2 (PFM::Pokemon)

    pokemon who originated the “problem” (eg. bind)

  • additionnal_var (nil, Hash{String => String}) (defaults to: nil)

    additional remplacements in the text

Returns:

  • (String)

    the text parsed and ready to be displayed



141
142
# File 'docs/00700_Ajout_PSDK.rb', line 141

def parse_text_with_2pokemon(file_id, text_id, pokemon1, pokemon2, additionnal_var = nil)
end

#parse_text_with_pokemon(file_id, text_id, pokemon, additionnal_var = nil) ⇒ String

Parse a text from the text database with specific informations and a pokemon

Parameters:

  • file_id (Integer)

    ID of the text file

  • text_id (Integer)

    ID of the text in the file

  • pokemon (PFM::Pokemon)

    pokemon that will introduce an offset on text_id (its name is also used)

  • additionnal_var (nil, Hash{String => String}) (defaults to: nil)

    additional remplacements in the text

Returns:

  • (String)

    the text parsed and ready to be displayed



132
133
# File 'docs/00700_Ajout_PSDK.rb', line 132

def parse_text_with_pokemon(file_id, text_id, pokemon, additionnal_var = nil)
end

#play_actor_collapse_se

Play the Actor collapse SE



200
201
# File 'docs/00700_Ajout_PSDK.rb', line 200

def play_actor_collapse_se
end

#play_buzzer_se

Play buzzer SE



179
180
# File 'docs/00700_Ajout_PSDK.rb', line 179

def play_buzzer_se
end

#play_cancel_se

Play cancel SE



182
183
# File 'docs/00700_Ajout_PSDK.rb', line 182

def play_cancel_se
end

#play_cursor_se

Play cursor SE



176
177
# File 'docs/00700_Ajout_PSDK.rb', line 176

def play_cursor_se
end

#play_decision_se

Play decision SE



173
174
# File 'docs/00700_Ajout_PSDK.rb', line 173

def play_decision_se
end

#play_enemy_collapse_se

Play the Enemy collapse SE



203
204
# File 'docs/00700_Ajout_PSDK.rb', line 203

def play_enemy_collapse_se
end

#play_equip_se

Play the Equip SE



185
186
# File 'docs/00700_Ajout_PSDK.rb', line 185

def play_equip_se
end

#play_escape_se

Play the Escape SE



197
198
# File 'docs/00700_Ajout_PSDK.rb', line 197

def play_escape_se
end

#play_load_se

Play the Load SE



194
195
# File 'docs/00700_Ajout_PSDK.rb', line 194

def play_load_se
end

#play_save_se

Play the Save SE



191
192
# File 'docs/00700_Ajout_PSDK.rb', line 191

def play_save_se
end

#play_shop_se

Play the Shop SE



188
189
# File 'docs/00700_Ajout_PSDK.rb', line 188

def play_shop_se
end

#text_file_get(file_id) ⇒ Array<String>

Get a list of text from the text database

Parameters:

  • file_id (Integer)

    ID of the text file

Returns:

  • (Array<String>)

    the list of text contained in the file.



159
160
# File 'docs/00700_Ajout_PSDK.rb', line 159

def text_file_get(file_id)
end

#text_get(file_id, text_id) ⇒ String

Get a text front the text database

Parameters:

  • file_id (Integer)

    ID of the text file

  • text_id (Integer)

    ID of the text in the file

Returns:



154
155
# File 'docs/00700_Ajout_PSDK.rb', line 154

def text_get(file_id, text_id)
end

#validate_param(method_name, *param_names, param_values)

Note:

To use a custom message, define a validate_param_message

Function that validate the input paramters

Examples:

Param with a static type

validate_param(:meth, :param, param => Type)

Param with various allowed types

validate_param(:meth, :param, param => [Type1, Type2])

Param using a validation method

validate_param(:meth, :param, param => :validation_method)

Param using a complex structure (Array of String)

validate_param(:meth, :param, param => { Array => String })

Param using a complex structure (Array of Symbol, Integer, String, repetetive)

validate_param(:meth, :param, param => { Array => [Symbol, Integer, String], :cyclic => true, min: 3, max: 9})

Param using a complex structure (Hash)

validate_param(:meth, :param, param => { Hash => { key1: Type, key2: Type2, key3: [String, Symbol] },
                                         :optional => [:key2] })

Parameters:

  • method_name (Symbol)

    name of the method which its param are being validated

  • param_names (Array<Symbol>)

    list of the names of the params

  • param_values (Hash)

    hash associating a param value to the expected type (description)



26
27
# File 'docs/00000_Dependencies.rb', line 26

def validate_param(method_name, *param_names, param_values)
end

#void(*args)

Function that does nothing and return nil

Examples:

alias function_to_disable void


31
32
# File 'docs/00000_Dependencies.rb', line 31

def void(*args)
end

#void0(*args)

Function that does nothing and return 0

Examples:

alias function_to_disable void0


46
47
# File 'docs/00000_Dependencies.rb', line 46

def void0(*args)
end

#void_array(*args)

Function that does nothing and return []

Examples:

alias function_to_disable void_array


51
52
# File 'docs/00000_Dependencies.rb', line 51

def void_array(*args)
end

#void_false(*args)

Function that does nothing and return false

Examples:

alias function_to_disable void_false


41
42
# File 'docs/00000_Dependencies.rb', line 41

def void_false(*args)
end

#void_string(*args)

Function that does nothing and return “”

Examples:

alias function_to_disable void_array


56
57
# File 'docs/00000_Dependencies.rb', line 56

def void_string(*args)
end

#void_true(*args)

Function that does nothing and return true

Examples:

alias function_to_disable void_true


36
37
# File 'docs/00000_Dependencies.rb', line 36

def void_true(*args)
end