Class: Studio::CreatureForm::Evolution

Inherits:
Object
  • Object
show all
Defined in:
scripts/00800 Studio/00001 Data/00042 CreatureForm.rb

Overview

Data class describing an evolution

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#conditionsArray<Hash> (readonly)

Conditions of the evolution

Returns:

  • (Array<Hash>)


142
143
144
# File 'scripts/00800 Studio/00001 Data/00042 CreatureForm.rb', line 142

def conditions
  @conditions
end

#db_symbolSymbol (readonly)

db_symbol of the creature to evolve to

Returns:

  • (Symbol)


134
135
136
# File 'scripts/00800 Studio/00001 Data/00042 CreatureForm.rb', line 134

def db_symbol
  @db_symbol
end

#formInteger (readonly)

Form of the creature to evolve to

Returns:



138
139
140
# File 'scripts/00800 Studio/00001 Data/00042 CreatureForm.rb', line 138

def form
  @form
end

Instance Method Details

#condition_data(type) ⇒ Symbol, Integer

Get data by condition

Parameters:

  • type (Symbol)

    type of condition to check

Returns:



147
148
149
150
# File 'scripts/00800 Studio/00001 Data/00042 CreatureForm.rb', line 147

def condition_data(type)
  condition = @conditions.find { |cdn| cdn[:type] == type }
  return condition && condition[:value]
end