Class: RPG::Weapon

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

Overview

Data class for weapons.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWeapon

Returns a new instance of Weapon.



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

def initialize
  @id = 0
  @name = ""
  @icon_name = ""
  @description = ""
  @animation1_id = 0
  @animation2_id = 0
  @price = 0
  @atk = 0
  @pdef = 0
  @mdef = 0
  @str_plus = 0
  @dex_plus = 0
  @agi_plus = 0
  @int_plus = 0
  @element_set = []
  @plus_state_set = []
  @minus_state_set = []
end

Instance Attribute Details

#agi_plusObject

The weapon’s agility bonus.



61
62
63
# File 'lib/rpg/weapon.rb', line 61

def agi_plus
  @agi_plus
end

#animation1_idObject

The animation ID when using the weapon.



37
38
39
# File 'lib/rpg/weapon.rb', line 37

def animation1_id
  @animation1_id
end

#animation2_idObject

The animation ID when on the receiving end of the weapon.



40
41
42
# File 'lib/rpg/weapon.rb', line 40

def animation2_id
  @animation2_id
end

#atkObject

The weapon’s attack power.



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

def atk
  @atk
end

#descriptionObject

The weapon description.



34
35
36
# File 'lib/rpg/weapon.rb', line 34

def description
  @description
end

#dex_plusObject

The weapon’s dexterity bonus.



58
59
60
# File 'lib/rpg/weapon.rb', line 58

def dex_plus
  @dex_plus
end

#element_setObject

The weapon’s element. An Elemental ID array.



67
68
69
# File 'lib/rpg/weapon.rb', line 67

def element_set
  @element_set
end

#icon_nameObject

The weapon’s icon graphic file name.



31
32
33
# File 'lib/rpg/weapon.rb', line 31

def icon_name
  @icon_name
end

#idObject

The weapon ID.



25
26
27
# File 'lib/rpg/weapon.rb', line 25

def id
  @id
end

#int_plusObject

The weapon’s intelligence bonus.



64
65
66
# File 'lib/rpg/weapon.rb', line 64

def int_plus
  @int_plus
end

#mdefObject

The weapon’s magic defense rating.



52
53
54
# File 'lib/rpg/weapon.rb', line 52

def mdef
  @mdef
end

#minus_state_setObject

States to cancel. A State ID array.



73
74
75
# File 'lib/rpg/weapon.rb', line 73

def minus_state_set
  @minus_state_set
end

#nameObject

The weapon name.



28
29
30
# File 'lib/rpg/weapon.rb', line 28

def name
  @name
end

#pdefObject

The weapon’s physical defense rating.



49
50
51
# File 'lib/rpg/weapon.rb', line 49

def pdef
  @pdef
end

#plus_state_setObject

States to add. A State ID array.



70
71
72
# File 'lib/rpg/weapon.rb', line 70

def plus_state_set
  @plus_state_set
end

#priceObject

The weapon’s price.



43
44
45
# File 'lib/rpg/weapon.rb', line 43

def price
  @price
end

#str_plusObject

The weapon’s strength bonus.



55
56
57
# File 'lib/rpg/weapon.rb', line 55

def str_plus
  @str_plus
end