Class: RPG::Class

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/class.rb

Defined Under Namespace

Classes: Learning

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClass

Returns a new instance of Class.



48
49
50
51
52
53
54
55
56
57
# File 'lib/rpg/class.rb', line 48

def initialize
  @id = 0
  @name = ""
  @position = 0
  @weapon_set = []
  @armor_set = []
  @element_ranks = Table.new(1)
  @state_ranks = Table.new(1)
  @learnings = []
end

Instance Attribute Details

#armor_setObject

Array containing IDs for equippable armor.



22
23
24
# File 'lib/rpg/class.rb', line 22

def armor_set
  @armor_set
end

#element_ranksObject

Level of elemental effectiveness. 1-dimensional Table using element IDs as subscripts, with 6 levels:

0

A

1

B

2

C

3

D

4

E

5

F



32
33
34
# File 'lib/rpg/class.rb', line 32

def element_ranks
  @element_ranks
end

#idObject

The class’s ID.



7
8
9
# File 'lib/rpg/class.rb', line 7

def id
  @id
end

#learningsArray<RPG::Class::Learning>

Skills to Learn. An Learning array.

Returns:



46
47
48
# File 'lib/rpg/class.rb', line 46

def learnings
  @learnings
end

#nameObject

The class name.



10
11
12
# File 'lib/rpg/class.rb', line 10

def name
  @name
end

#positionObject

The class position:

0

front

1

middle

2

rear



16
17
18
# File 'lib/rpg/class.rb', line 16

def position
  @position
end

#state_ranksObject

Level of status effectiveness. 1-dimensional Table using status IDs as subscripts, with 6 levels:

0

A

1

B

2

C

3

D

4

E

5

F



42
43
44
# File 'lib/rpg/class.rb', line 42

def state_ranks
  @state_ranks
end

#weapon_setObject

Array containing IDs for equippable weapons.



19
20
21
# File 'lib/rpg/class.rb', line 19

def weapon_set
  @weapon_set
end