Class: RPG::Troop::Page::Condition
- Inherits:
-
Object
- Object
- RPG::Troop::Page::Condition
- Defined in:
- lib/rpg/troop.rb
Overview
A database of battle event [Conditions].
Instance Attribute Summary collapse
-
#actor_hp ⇒ Object
HP percentage specified in the [Actor] condition.
-
#actor_id ⇒ Object
Actor ID specified in the [Actor] condition.
-
#actor_valid ⇒ Object
Truth value for whether the [Actor] condition is valid.
-
#enemy_hp ⇒ Object
HP percentage specified in the [Enemy] condition.
-
#enemy_index ⇒ Object
Troop member index specified in the [Enemy] condition (0..7).
-
#enemy_valid ⇒ Object
Truth value for whether the [Enemy] condition is valid.
-
#switch_id ⇒ Object
Switch ID specified in the [Switch] condition.
-
#switch_valid ⇒ Object
Truth value for whether the [Switch] condition is valid.
-
#turn_a ⇒ Object
a value specified in the [Turn] condition.
-
#turn_b ⇒ Object
b value specified in the [Turn] condition.
-
#turn_valid ⇒ Object
Truth value for whether the [Turn] condition is valid.
Instance Method Summary collapse
-
#initialize ⇒ Condition
constructor
A new instance of Condition.
Constructor Details
#initialize ⇒ Condition
Returns a new instance of Condition.
76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rpg/troop.rb', line 76 def initialize @turn_valid = false @enemy_valid = false @actor_valid = false @switch_valid = false @turn_a = 0 @turn_b = 0 @enemy_index = 0 @enemy_hp = 50 @actor_id = 1 @actor_hp = 50 @switch_id = 1 end |
Instance Attribute Details
#actor_hp ⇒ Object
HP percentage specified in the [Actor] condition.
120 121 122 |
# File 'lib/rpg/troop.rb', line 120 def actor_hp @actor_hp end |
#actor_id ⇒ Object
Actor ID specified in the [Actor] condition.
117 118 119 |
# File 'lib/rpg/troop.rb', line 117 def actor_id @actor_id end |
#actor_valid ⇒ Object
Truth value for whether the [Actor] condition is valid.
97 98 99 |
# File 'lib/rpg/troop.rb', line 97 def actor_valid @actor_valid end |
#enemy_hp ⇒ Object
HP percentage specified in the [Enemy] condition.
114 115 116 |
# File 'lib/rpg/troop.rb', line 114 def enemy_hp @enemy_hp end |
#enemy_index ⇒ Object
Troop member index specified in the [Enemy] condition (0..7).
111 112 113 |
# File 'lib/rpg/troop.rb', line 111 def enemy_index @enemy_index end |
#enemy_valid ⇒ Object
Truth value for whether the [Enemy] condition is valid.
94 95 96 |
# File 'lib/rpg/troop.rb', line 94 def enemy_valid @enemy_valid end |
#switch_id ⇒ Object
Switch ID specified in the [Switch] condition.
123 124 125 |
# File 'lib/rpg/troop.rb', line 123 def switch_id @switch_id end |
#switch_valid ⇒ Object
Truth value for whether the [Switch] condition is valid.
100 101 102 |
# File 'lib/rpg/troop.rb', line 100 def switch_valid @switch_valid end |
#turn_a ⇒ Object
a value specified in the [Turn] condition. To be input in the form a + bx.
104 105 106 |
# File 'lib/rpg/troop.rb', line 104 def turn_a @turn_a end |
#turn_b ⇒ Object
b value specified in the [Turn] condition. To be input in the form a + bx.
108 109 110 |
# File 'lib/rpg/troop.rb', line 108 def turn_b @turn_b end |
#turn_valid ⇒ Object
Truth value for whether the [Turn] condition is valid.
91 92 93 |
# File 'lib/rpg/troop.rb', line 91 def turn_valid @turn_valid end |