Class: RPG::Skill
- Inherits:
-
Object
- Object
- RPG::Skill
- Defined in:
- lib/rpg/skill.rb
Overview
Data class for skills.
Instance Attribute Summary collapse
-
#agi_f ⇒ Object
The skill’s agility F rating.
-
#animation1_id ⇒ Object
The animation ID when using the skill.
-
#animation2_id ⇒ Object
The animation ID when on the receiving end of the skill.
-
#atk_f ⇒ Object
The skill’s attack power F rating.
-
#common_event_id ⇒ Object
The Common Event ID.
-
#description ⇒ Object
The skill description.
-
#dex_f ⇒ Object
The skill’s dexterity F rating.
-
#element_set ⇒ Object
The skill’s element.
-
#eva_f ⇒ Object
The skill’s evasion F rating.
-
#hit ⇒ Object
The skill’s hit probability.
-
#icon_name ⇒ Object
The skill’s icon graphic file name.
-
#id ⇒ Object
The skill ID.
-
#int_f ⇒ Object
The skill’s intelligence F rating.
-
#mdef_f ⇒ Object
The skill’s magic defense F rating.
-
#menu_se ⇒ Object
SE played when skill is used on the menu screen AudioFile.
-
#minus_state_set ⇒ Object
States to cancel.
-
#name ⇒ Object
The skill name.
-
#occasion ⇒ Object
- When the skill may be used: 0
- always 1
- only in battle 2
- only from the menu 3
-
never.
-
#pdef_f ⇒ Object
The skill’s physical defense F rating.
-
#plus_state_set ⇒ Object
States to add.
-
#power ⇒ Object
The skill’s power.
-
#scope ⇒ Object
- 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.
-
#sp_cost ⇒ Object
Number of SP consumed.
-
#str_f ⇒ Object
The skill’s strength F rating.
-
#variance ⇒ Object
The skill’s degree of variance.
Instance Method Summary collapse
-
#initialize ⇒ Skill
constructor
A new instance of Skill.
Constructor Details
#initialize ⇒ Skill
Returns a new instance of Skill.
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_f ⇒ Object
The skill’s agility F rating.
95 96 97 |
# File 'lib/rpg/skill.rb', line 95 def agi_f @agi_f end |
#animation1_id ⇒ Object
The animation ID when using the skill.
65 66 67 |
# File 'lib/rpg/skill.rb', line 65 def animation1_id @animation1_id end |
#animation2_id ⇒ Object
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_f ⇒ Object
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_id ⇒ Object
The Common Event ID.
74 75 76 |
# File 'lib/rpg/skill.rb', line 74 def common_event_id @common_event_id end |
#description ⇒ Object
The skill description.
44 45 46 |
# File 'lib/rpg/skill.rb', line 44 def description @description end |
#dex_f ⇒ Object
The skill’s dexterity F rating.
92 93 94 |
# File 'lib/rpg/skill.rb', line 92 def dex_f @dex_f end |
#element_set ⇒ Object
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_f ⇒ Object
The skill’s evasion F rating.
86 87 88 |
# File 'lib/rpg/skill.rb', line 86 def eva_f @eva_f end |
#hit ⇒ Object
The skill’s hit probability.
101 102 103 |
# File 'lib/rpg/skill.rb', line 101 def hit @hit end |
#icon_name ⇒ Object
The skill’s icon graphic file name.
41 42 43 |
# File 'lib/rpg/skill.rb', line 41 def icon_name @icon_name end |
#id ⇒ Object
The skill ID.
35 36 37 |
# File 'lib/rpg/skill.rb', line 35 def id @id end |
#int_f ⇒ Object
The skill’s intelligence F rating.
98 99 100 |
# File 'lib/rpg/skill.rb', line 98 def int_f @int_f end |
#mdef_f ⇒ Object
The skill’s magic defense F rating.
107 108 109 |
# File 'lib/rpg/skill.rb', line 107 def mdef_f @mdef_f end |
#menu_se ⇒ Object
SE played when skill is used on the menu screen AudioFile.
71 72 73 |
# File 'lib/rpg/skill.rb', line 71 def @menu_se end |
#minus_state_set ⇒ Object
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 |
#name ⇒ Object
The skill name.
38 39 40 |
# File 'lib/rpg/skill.rb', line 38 def name @name end |
#occasion ⇒ Object
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_f ⇒ Object
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_set ⇒ Object
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 |
#power ⇒ Object
The skill’s power.
80 81 82 |
# File 'lib/rpg/skill.rb', line 80 def power @power end |
#scope ⇒ Object
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_cost ⇒ Object
Number of SP consumed.
77 78 79 |
# File 'lib/rpg/skill.rb', line 77 def sp_cost @sp_cost end |
#str_f ⇒ Object
The skill’s strength F rating.
89 90 91 |
# File 'lib/rpg/skill.rb', line 89 def str_f @str_f end |
#variance ⇒ Object
The skill’s degree of variance.
110 111 112 |
# File 'lib/rpg/skill.rb', line 110 def variance @variance end |