Class: Studio::Type

Inherits:
Object show all
Defined in:
docs/3_Studio.rb

Overview

Data class describing a type

Defined Under Namespace

Classes: DamageTo

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#color ⇒ Color? (readonly)

Color of the type

Returns:



1218
1219
1220
# File 'docs/3_Studio.rb', line 1218

def color
  @color
end

#damage_to ⇒ Array<DamageTo> (readonly)

List of damage the type deals to another type

Returns:



1215
1216
1217
# File 'docs/3_Studio.rb', line 1215

def damage_to
  @damage_to
end

#db_symbol ⇒ Symbol (readonly)

db_symbol of the type

Returns:

  • (Symbol)


1209
1210
1211
# File 'docs/3_Studio.rb', line 1209

def db_symbol
  @db_symbol
end

#id ⇒ Integer (readonly)

ID of the type

Returns:

  • (Integer)


1206
1207
1208
# File 'docs/3_Studio.rb', line 1206

def id
  @id
end

#text_id ⇒ Integer (readonly)

ID of the text of the type in the text files

Returns:

  • (Integer)


1212
1213
1214
# File 'docs/3_Studio.rb', line 1212

def text_id
  @text_id
end

Instance Method Details

#hit(other_type) ⇒ Float

Get the modifier of this type when hitting another type

Parameters:

  • other_type (Symbol) —

    db_symbol of the other type

Returns:

  • (Float)


1226
1227
# File 'docs/3_Studio.rb', line 1226

def hit(other_type)
end

#name ⇒ String

Get the text name of the type

Returns:



1221
1222
# File 'docs/3_Studio.rb', line 1221

def name
end