Class: RPG::Armor

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeArmor

Returns a new instance of Armor.



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/rpg/armor.rb', line 3

def initialize
  @id = 0
  @name = ""
  @icon_name = ""
  @description = ""
  @kind = 0
  @auto_state_id = 0
  @price = 0
  @pdef = 0
  @mdef = 0
  @eva = 0
  @str_plus = 0
  @dex_plus = 0
  @agi_plus = 0
  @int_plus = 0
  @guard_element_set = []
  @guard_state_set = []
end

Instance Attribute Details

#agi_plusObject

The armor’s agility bonus.



63
64
65
# File 'lib/rpg/armor.rb', line 63

def agi_plus
  @agi_plus
end

#auto_state_idObject

The auto state ID.



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

def auto_state_id
  @auto_state_id
end

#descriptionObject

The armor description.



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

def description
  @description
end

#dex_plusObject

The armor’s dexterity bonus.



60
61
62
# File 'lib/rpg/armor.rb', line 60

def dex_plus
  @dex_plus
end

#evaObject

The armor’s evasion correction.



54
55
56
# File 'lib/rpg/armor.rb', line 54

def eva
  @eva
end

#guard_element_setObject

The armor’s elemental defense rating. An elemental ID array.



69
70
71
# File 'lib/rpg/armor.rb', line 69

def guard_element_set
  @guard_element_set
end

#guard_state_setObject

The armor’s state defense rating. A state ID array.



72
73
74
# File 'lib/rpg/armor.rb', line 72

def guard_state_set
  @guard_state_set
end

#icon_nameObject

The armor’s icon graphic file name.



29
30
31
# File 'lib/rpg/armor.rb', line 29

def icon_name
  @icon_name
end

#idObject

The armor ID.



23
24
25
# File 'lib/rpg/armor.rb', line 23

def id
  @id
end

#int_plusObject

The armor’s intelligence bonus.



66
67
68
# File 'lib/rpg/armor.rb', line 66

def int_plus
  @int_plus
end

#kindObject

Type of armor:

0

shield

1

helmet

2

body armor

3

accessory



39
40
41
# File 'lib/rpg/armor.rb', line 39

def kind
  @kind
end

#mdefObject

The armor’s magic defense rating.



51
52
53
# File 'lib/rpg/armor.rb', line 51

def mdef
  @mdef
end

#nameObject

The armor name.



26
27
28
# File 'lib/rpg/armor.rb', line 26

def name
  @name
end

#pdefObject

The armor’s physical defense rating.



48
49
50
# File 'lib/rpg/armor.rb', line 48

def pdef
  @pdef
end

#priceObject

The armor’s price.



45
46
47
# File 'lib/rpg/armor.rb', line 45

def price
  @price
end

#str_plusObject

The armor’s strength bonus.



57
58
59
# File 'lib/rpg/armor.rb', line 57

def str_plus
  @str_plus
end