Class: PFM::PokemonBattler::StatHistory

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stat, power, target, launcher, move) ⇒ StatHistory

Create a new Stat History

Parameters:

  • stat (Symbol)

    :atk, :dfe, :spd, :ats, :dfs, :acc, :eva

  • power (Integer)

    power of the stat change

  • target (PFM::PokemonBattler)

    target of the stat change

  • launcher (PFM::PokemonBattler, nil)

    launcher of the stat change

  • move (Battle::Move, nil)

    move that cause the stat change



822
823
# File 'docs/5_Battle_03_PokemonBattler.rb', line 822

def initialize(stat, power, target, launcher, move)
end

Instance Attribute Details

#launcherPFM::PokemonBattler? (readonly)

Get the launcher of the stat change

Returns:



812
813
814
# File 'docs/5_Battle_03_PokemonBattler.rb', line 812

def launcher
  @launcher
end

#moveBattle::Move? (readonly)

Get the move that cause the stat change

Returns:



815
816
817
# File 'docs/5_Battle_03_PokemonBattler.rb', line 815

def move
  @move
end

#powerInteger (readonly)

Get the power of the stat change

Returns:

  • (Integer)


806
807
808
# File 'docs/5_Battle_03_PokemonBattler.rb', line 806

def power
  @power
end

#statSymbol (readonly)

:atk, :dfe, :spd, :ats, :dfs, :acc, :eva

Returns:

  • (Symbol)


803
804
805
# File 'docs/5_Battle_03_PokemonBattler.rb', line 803

def stat
  @stat
end

#targetPFM::PokemonBattler (readonly)

Get the target of the stat change

Returns:



809
810
811
# File 'docs/5_Battle_03_PokemonBattler.rb', line 809

def target
  @target
end

#turnInteger (readonly)

Get the turn when it was used

Returns:

  • (Integer)


800
801
802
# File 'docs/5_Battle_03_PokemonBattler.rb', line 800

def turn
  @turn
end

Instance Method Details

#current_turn?Boolean

Tell if the move was used during the current turn

Returns:

  • (Boolean)


830
831
# File 'docs/5_Battle_03_PokemonBattler.rb', line 830

def current_turn?
end

#db_symbolSymbol

Get the db_symbol of the move

Returns:

  • (Symbol)


834
835
# File 'docs/5_Battle_03_PokemonBattler.rb', line 834

def db_symbol
end

#last_turn?Boolean

Tell if the move was used during last turn

Returns:

  • (Boolean)


826
827
# File 'docs/5_Battle_03_PokemonBattler.rb', line 826

def last_turn?
end