Class: PFM::Wild_RoamingInfo

Inherits:
Object
  • Object
show all
Defined in:
docs/4_Systems_999_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



331
332
# File 'docs/4_Systems_999_Wild.rb', line 331

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)


313
314
315
# File 'docs/4_Systems_999_Wild.rb', line 313

def map_id
  @map_id
end

#pokemonPFM::Pokemon (readonly)

The roaming Pokemon

Returns:



316
317
318
# File 'docs/4_Systems_999_Wild.rb', line 316

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)


319
320
321
# File 'docs/4_Systems_999_Wild.rb', line 319

def spotted
  @spotted
end

#tagInteger

The tag in which the Roaming Pokemon will appear

Returns:

  • (Integer)


307
308
309
# File 'docs/4_Systems_999_Wild.rb', line 307

def tag
  @tag
end

#zone_typeInteger

The system_tag zone ID in which the Roaming Pokemon will appear

Returns:

  • (Integer)


310
311
312
# File 'docs/4_Systems_999_Wild.rb', line 310

def zone_type
  @zone_type
end

Class Method Details

.lock

Disallow roaming informations to be updated



325
326
# File 'docs/4_Systems_999_Wild.rb', line 325

def self.lock
end

.unlock

Allow roaming informations to be updated



322
323
# File 'docs/4_Systems_999_Wild.rb', line 322

def self.unlock
end

Instance Method Details

#appearing?Boolean

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

Returns:

  • (Boolean)


342
343
# File 'docs/4_Systems_999_Wild.rb', line 342

def appearing?
end

#could_appear?Boolean

Test if the Roaming Pokemon could appear here

Returns:

  • (Boolean)


346
347
# File 'docs/4_Systems_999_Wild.rb', line 346

def could_appear?
end

#pokemon_dead?Boolean

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

Returns:

  • (Boolean)


338
339
# File 'docs/4_Systems_999_Wild.rb', line 338

def pokemon_dead?
end

#update

Call the Roaming Proc to update the Roaming Pokemon zone information



334
335
# File 'docs/4_Systems_999_Wild.rb', line 334

def update
end