Class: PFM::Wild_RoamingInfo

Inherits:
Object
  • Object
show all
Defined in:
docs/01450_Systems_99991_Wild.rb

Overview

Wild Roaming Pokemon informations

Author:

  • Nuri Yuri

Constant Summary collapse

RoamingProcs =

The proc takes the Wild_RoamingInfo in parameter and change the informations.

[proc do |infos|
  infos.map_id = 1
  infos.zone_type = 1
  infos.tag = 1
end, proc do |infos|
  maps = [5, 20]
  if (infos.map_id == $game_map.map_id && infos.spotted) || infos.map_id == -1
    infos.map_id = (maps - [infos.map_id]).sample
    infos.spotted = false
  end
  infos.zone_type = 1
  infos.tag = 0
end]
@@locked =
true

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pokemon, chance, zone_proc_id) ⇒ Wild_RoamingInfo

Create a new Wild_RoamingInfo

Parameters:

  • pokemon (PFM::Pokemon)

    the roaming Pokemon

  • chance (Integer)

    the chance divider to see the Pokemon

  • zone_proc_id (Integer)

    ID of the Wild_RoamingInfo::RoamingProcs



321
322
# File 'docs/01450_Systems_99991_Wild.rb', line 321

def initialize(pokemon, chance, zone_proc_id)
end

Instance Attribute Details

#map_idInteger

The ID of the map in which the Roaming Pokemon will appear

Returns:

  • (Integer)


303
304
305
# File 'docs/01450_Systems_99991_Wild.rb', line 303

def map_id
  @map_id
end

#pokemonPFM::Pokemon (readonly)

The roaming Pokemon

Returns:



306
307
308
# File 'docs/01450_Systems_99991_Wild.rb', line 306

def pokemon
  @pokemon
end

#spottedBoolean

The spotted state of the pokemon. True if the player look at the map position or after fighting the roaming pokemon

Returns:

  • (Boolean)


309
310
311
# File 'docs/01450_Systems_99991_Wild.rb', line 309

def spotted
  @spotted
end

#tagInteger

The tag in which the Roaming Pokemon will appear

Returns:

  • (Integer)


297
298
299
# File 'docs/01450_Systems_99991_Wild.rb', line 297

def tag
  @tag
end

#zone_typeInteger

The system_tag zone ID in which the Roaming Pokemon will appear

Returns:

  • (Integer)


300
301
302
# File 'docs/01450_Systems_99991_Wild.rb', line 300

def zone_type
  @zone_type
end

Class Method Details

.lock

Disallow roaming informations to be updated



315
316
# File 'docs/01450_Systems_99991_Wild.rb', line 315

def self.lock
end

.unlock

Allow roaming informations to be updated



312
313
# File 'docs/01450_Systems_99991_Wild.rb', line 312

def self.unlock
end

Instance Method Details

#appearing?Boolean

Test if the Roaming Pokemon is appearing (to start the battle)

Returns:

  • (Boolean)


332
333
# File 'docs/01450_Systems_99991_Wild.rb', line 332

def appearing?
end

#could_appear?Boolean

Test if the Roaming Pokemon could appear here

Returns:

  • (Boolean)


336
337
# File 'docs/01450_Systems_99991_Wild.rb', line 336

def could_appear?
end

#pokemon_dead?Boolean

Test if the Pokemon is dead (delete from the stack)

Returns:

  • (Boolean)


328
329
# File 'docs/01450_Systems_99991_Wild.rb', line 328

def pokemon_dead?
end

#update

Call the Roaming Proc to update the Roaming Pokemon zone information



324
325
# File 'docs/01450_Systems_99991_Wild.rb', line 324

def update
end