Class: Battle::Effects::Item::TerrainSeeds

Inherits:
Item
  • Object
show all
Defined in:
docs/5_Battle_06_Effects_05_Item_Effects.rb

Overview

Class describing Terrain Seed item effects

Constant Summary collapse

ITEM_DATA =

Data about the different terrain seeds

Returns:

  • (Hash{Symbol => Hash{Symbol => Symbol}})
{}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.register(db_symbol, terrain, stat, klass = TerrainSeeds)

Parameters:

  • db_symbol (Symbol) —

    db_symbol of the item

  • terrain (Symbol) —

    symbol of the terrain triggering the item

  • stat (Symbol) —

    symbol of the stat raised by the item

  • klass (Class<TerrainSeeds>) (defaults to: TerrainSeeds) —

    klass to instanciate



554
555
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 554

def register(db_symbol, terrain, stat, klass = TerrainSeeds)
end

Instance Method Details

#on_post_fterrain_change(handler, fterrain_type, last_fterrain)

Function called after the field terrain was changed (on_post_fterrain_change)

Parameters:

  • handler (Battle::Logic::FTerrainChangeHandler)
  • fterrain_type (Symbol) —

    :none, :electric_terrain, :grassy_terrain, :misty_terrain, :psychic_terrain

  • last_fterrain (Symbol) —

    :none, :electric_terrain, :grassy_terrain, :misty_terrain, :psychic_terrain



543
544
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 543

def on_post_fterrain_change(handler, fterrain_type, last_fterrain)
end

#on_switch_event(handler, who, with)

Function called when a Pokemon has actually switched with another one

Parameters:



537
538
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 537

def on_switch_event(handler, who, with)
end

#use_item_effect(handler)

Function processing the effect of the item

Parameters:



547
548
# File 'docs/5_Battle_06_Effects_05_Item_Effects.rb', line 547

def use_item_effect(handler)
end