Class: PFM::Nuzlocke

Inherits:
Object show all
Defined in:
docs/4_Systems_204_Nuzlocke.rb

Overview

Class responsive of managing Nuzlocke information and helping to implement the nuzlocke logic

Author:

  • Logically anime and ralandel

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(game_state = PFM.game_state) ⇒ Nuzlocke

Create a new Nuzlocke object

Parameters:

  • game_state (PFM::GameState) (defaults to: PFM.game_state)

    variable responsive of containing the whole game state for easier access



16
17
# File 'docs/4_Systems_204_Nuzlocke.rb', line 16

def initialize(game_state = PFM.game_state)
end

Instance Attribute Details

#game_statePFM::GameState

Get the game state responsive of the whole game state

Returns:



13
14
15
# File 'docs/4_Systems_204_Nuzlocke.rb', line 13

def game_state
  @game_state
end

#graveyardArray<PFM::Pokemon>

Storage of dead Pokemon to re-use later in other systems

Returns:



10
11
12
# File 'docs/4_Systems_204_Nuzlocke.rb', line 10

def graveyard
  @graveyard
end

#no_lock_on_duplicateBoolean

If we prevent Duplicate from locking catch

Returns:

  • (Boolean)


7
8
9
# File 'docs/4_Systems_204_Nuzlocke.rb', line 7

def no_lock_on_duplicate
  @no_lock_on_duplicate
end

Instance Method Details

#catching_locked?(id) ⇒ Boolean

Tell if catching is locked in the given zone

Parameters:

  • id (Integer)

    ID of the zone

Returns:

  • (Boolean)


31
32
# File 'docs/4_Systems_204_Nuzlocke.rb', line 31

def catching_locked?(id)
end

#catching_locked_here?Boolean

Tell if catching is locked in the current zone

Returns:

  • (Boolean)


35
36
# File 'docs/4_Systems_204_Nuzlocke.rb', line 35

def catching_locked_here?
end

#clear_dead_pokemon Also known as: dead

Function that clears the dead Pokemon from the party and put their item back in the bag



20
21
# File 'docs/4_Systems_204_Nuzlocke.rb', line 20

def clear_dead_pokemon
end

#disable

Disable the Nuzlocke



49
50
# File 'docs/4_Systems_204_Nuzlocke.rb', line 49

def disable
end

#enable

Enable the Nuzlocke



46
47
# File 'docs/4_Systems_204_Nuzlocke.rb', line 46

def enable
end

#enabled?Boolean

Tell if the Nuzlocke is enabled

Returns:

  • (Boolean)


43
44
# File 'docs/4_Systems_204_Nuzlocke.rb', line 43

def enabled?
end

#lock_catch_in_current_zone(pokemon_id)

Note:

This method checks if that’s possible to lock before locking

Lock the current zone (prevent Pokemon from being able to be caught here)

Parameters:

  • pokemon_id (Integer)

    ID of the Pokemon that was seen before locking



26
27
# File 'docs/4_Systems_204_Nuzlocke.rb', line 26

def lock_catch_in_current_zone(pokemon_id)
end

#switch(bool)

Switch the enable state of the Nuzlocke

Parameters:

  • bool (Boolean)


39
40
# File 'docs/4_Systems_204_Nuzlocke.rb', line 39

def switch(bool)
end