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



388
389
# File 'docs/4_Systems_999_Wild.rb', line 388

def initialize(pokemon, chance, zone_proc_id)
end

Instance Attribute Details

#map_id ⇒ Integer

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

Returns:

  • (Integer)


370
371
372
# File 'docs/4_Systems_999_Wild.rb', line 370

def map_id
  @map_id
end

#pokemon ⇒ PFM::Pokemon (readonly)

The roaming Pokemon

Returns:



373
374
375
# File 'docs/4_Systems_999_Wild.rb', line 373

def pokemon
  @pokemon
end

#spotted ⇒ Boolean

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

Returns:

  • (Boolean)


376
377
378
# File 'docs/4_Systems_999_Wild.rb', line 376

def spotted
  @spotted
end

#tag ⇒ Integer

The tag in which the Roaming Pokemon will appear

Returns:

  • (Integer)


364
365
366
# File 'docs/4_Systems_999_Wild.rb', line 364

def tag
  @tag
end

#zone_type ⇒ Integer

The system_tag zone ID in which the Roaming Pokemon will appear

Returns:

  • (Integer)


367
368
369
# File 'docs/4_Systems_999_Wild.rb', line 367

def zone_type
  @zone_type
end

Class Method Details

.lock

Disallow roaming informations to be updated



382
383
# File 'docs/4_Systems_999_Wild.rb', line 382

def self.lock
end

.unlock

Allow roaming informations to be updated



379
380
# File 'docs/4_Systems_999_Wild.rb', line 379

def self.unlock
end

Instance Method Details

#appearing? ⇒ Boolean

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

Returns:

  • (Boolean)


399
400
# File 'docs/4_Systems_999_Wild.rb', line 399

def appearing?
end

#could_appear? ⇒ Boolean

Test if the Roaming Pokemon could appear here

Returns:

  • (Boolean)


403
404
# File 'docs/4_Systems_999_Wild.rb', line 403

def could_appear?
end

#pokemon_dead? ⇒ Boolean

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

Returns:

  • (Boolean)


395
396
# File 'docs/4_Systems_999_Wild.rb', line 395

def pokemon_dead?
end

#update

Call the Roaming Proc to update the Roaming Pokemon zone information



391
392
# File 'docs/4_Systems_999_Wild.rb', line 391

def update
end