Class: RPG::Skill

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

Overview

Data class for skills.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSkill


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/rpg/skill.rb', line 6

def initialize
  @id = 0
  @name = ""
  @icon_name = ""
  @description = ""
  @scope = 0
  @occasion = 1
  @animation1_id = 0
  @animation2_id = 0
  @menu_se = RPG::AudioFile.new("", 80)
  @common_event_id = 0
  @sp_cost = 0
  @power = 0
  @atk_f = 0
  @eva_f = 0
  @str_f = 0
  @dex_f = 0
  @agi_f = 0
  @int_f = 100
  @hit = 100
  @pdef_f = 0
  @mdef_f = 100
  @variance = 15
  @element_set = []
  @plus_state_set = []
  @minus_state_set = []
end

Instance Attribute Details

#agi_fObject

The skill's agility F rating.


95
96
97
# File 'lib/rpg/skill.rb', line 95

def agi_f
  @agi_f
end

#animation1_idObject

The animation ID when using the skill.


65
66
67
# File 'lib/rpg/skill.rb', line 65

def animation1_id
  @animation1_id
end

#animation2_idObject

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


68
69
70
# File 'lib/rpg/skill.rb', line 68

def animation2_id
  @animation2_id
end

#atk_fObject

The skill's attack power F rating.


83
84
85
# File 'lib/rpg/skill.rb', line 83

def atk_f
  @atk_f
end

#common_event_idObject

The Common Event ID.


74
75
76
# File 'lib/rpg/skill.rb', line 74

def common_event_id
  @common_event_id
end

#descriptionObject

The skill description.


44
45
46
# File 'lib/rpg/skill.rb', line 44

def description
  @description
end

#dex_fObject

The skill's dexterity F rating.


92
93
94
# File 'lib/rpg/skill.rb', line 92

def dex_f
  @dex_f
end

#element_setObject

The skill's element. An Elemental ID array.


113
114
115
# File 'lib/rpg/skill.rb', line 113

def element_set
  @element_set
end

#eva_fObject

The skill's evasion F rating.


86
87
88
# File 'lib/rpg/skill.rb', line 86

def eva_f
  @eva_f
end

#hitObject

The skill's hit probability.


101
102
103
# File 'lib/rpg/skill.rb', line 101

def hit
  @hit
end

#icon_nameObject

The skill's icon graphic file name.


41
42
43
# File 'lib/rpg/skill.rb', line 41

def icon_name
  @icon_name
end

#idObject

The skill ID.


35
36
37
# File 'lib/rpg/skill.rb', line 35

def id
  @id
end

#int_fObject

The skill's intelligence F rating.


98
99
100
# File 'lib/rpg/skill.rb', line 98

def int_f
  @int_f
end

#mdef_fObject

The skill's magic defense F rating.


107
108
109
# File 'lib/rpg/skill.rb', line 107

def mdef_f
  @mdef_f
end

SE played when skill is used on the menu screen AudioFile.


71
72
73
# File 'lib/rpg/skill.rb', line 71

def menu_se
  @menu_se
end

#minus_state_setObject

States to cancel. A State ID array.


119
120
121
# File 'lib/rpg/skill.rb', line 119

def minus_state_set
  @minus_state_set
end

#nameObject

The skill name.


38
39
40
# File 'lib/rpg/skill.rb', line 38

def name
  @name
end

#occasionObject

When the skill may be used:

0

always

1

only in battle

2

only from the menu

3

never


62
63
64
# File 'lib/rpg/skill.rb', line 62

def occasion
  @occasion
end

#pdef_fObject

The skill's physical defense F rating.


104
105
106
# File 'lib/rpg/skill.rb', line 104

def pdef_f
  @pdef_f
end

#plus_state_setObject

States to add. A State ID array.


116
117
118
# File 'lib/rpg/skill.rb', line 116

def plus_state_set
  @plus_state_set
end

#powerObject

The skill's power.


80
81
82
# File 'lib/rpg/skill.rb', line 80

def power
  @power
end

#scopeObject

Scope of the skill's effects:

0

none

1

one enemy

2

all enemies

3

one ally

4

all allies

5

1 ally–HP 0

6

all allies–HP 0

7

the user


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

def scope
  @scope
end

#sp_costObject

Number of SP consumed.


77
78
79
# File 'lib/rpg/skill.rb', line 77

def sp_cost
  @sp_cost
end

#str_fObject

The skill's strength F rating.


89
90
91
# File 'lib/rpg/skill.rb', line 89

def str_f
  @str_f
end

#varianceObject

The skill's degree of variance.


110
111
112
# File 'lib/rpg/skill.rb', line 110

def variance
  @variance
end