Class: RPG::Armor
- Inherits:
-
Object
- Object
- RPG::Armor
- Defined in:
- lib/rpg/armor.rb
Instance Attribute Summary collapse
-
#agi_plus ⇒ Object
The armor’s agility bonus.
-
#auto_state_id ⇒ Object
The auto state ID.
-
#description ⇒ Object
The armor description.
-
#dex_plus ⇒ Object
The armor’s dexterity bonus.
-
#eva ⇒ Object
The armor’s evasion correction.
-
#guard_element_set ⇒ Object
The armor’s elemental defense rating.
-
#guard_state_set ⇒ Object
The armor’s state defense rating.
-
#icon_name ⇒ Object
The armor’s icon graphic file name.
-
#id ⇒ Object
The armor ID.
-
#int_plus ⇒ Object
The armor’s intelligence bonus.
-
#kind ⇒ Object
- Type of armor: 0
- shield 1
- helmet 2
- body armor 3
-
accessory.
-
#mdef ⇒ Object
The armor’s magic defense rating.
-
#name ⇒ Object
The armor name.
-
#pdef ⇒ Object
The armor’s physical defense rating.
-
#price ⇒ Object
The armor’s price.
-
#str_plus ⇒ Object
The armor’s strength bonus.
Instance Method Summary collapse
-
#initialize ⇒ Armor
constructor
A new instance of Armor.
Constructor Details
#initialize ⇒ Armor
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_plus ⇒ Object
The armor’s agility bonus.
63 64 65 |
# File 'lib/rpg/armor.rb', line 63 def agi_plus @agi_plus end |
#auto_state_id ⇒ Object
The auto state ID.
42 43 44 |
# File 'lib/rpg/armor.rb', line 42 def auto_state_id @auto_state_id end |
#description ⇒ Object
The armor description.
32 33 34 |
# File 'lib/rpg/armor.rb', line 32 def description @description end |
#dex_plus ⇒ Object
The armor’s dexterity bonus.
60 61 62 |
# File 'lib/rpg/armor.rb', line 60 def dex_plus @dex_plus end |
#eva ⇒ Object
The armor’s evasion correction.
54 55 56 |
# File 'lib/rpg/armor.rb', line 54 def eva @eva end |
#guard_element_set ⇒ Object
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_set ⇒ Object
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_name ⇒ Object
The armor’s icon graphic file name.
29 30 31 |
# File 'lib/rpg/armor.rb', line 29 def icon_name @icon_name end |
#id ⇒ Object
The armor ID.
23 24 25 |
# File 'lib/rpg/armor.rb', line 23 def id @id end |
#int_plus ⇒ Object
The armor’s intelligence bonus.
66 67 68 |
# File 'lib/rpg/armor.rb', line 66 def int_plus @int_plus end |
#kind ⇒ Object
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 |
#mdef ⇒ Object
The armor’s magic defense rating.
51 52 53 |
# File 'lib/rpg/armor.rb', line 51 def mdef @mdef end |
#name ⇒ Object
The armor name.
26 27 28 |
# File 'lib/rpg/armor.rb', line 26 def name @name end |
#pdef ⇒ Object
The armor’s physical defense rating.
48 49 50 |
# File 'lib/rpg/armor.rb', line 48 def pdef @pdef end |
#price ⇒ Object
The armor’s price.
45 46 47 |
# File 'lib/rpg/armor.rb', line 45 def price @price end |
#str_plus ⇒ Object
The armor’s strength bonus.
57 58 59 |
# File 'lib/rpg/armor.rb', line 57 def str_plus @str_plus end |