class RPG::UsableItem

Attributes

animation_id[RW]
damage[RW]
effects[RW]
hit_type[RW]
occasion[RW]
repeats[RW]
scope[RW]
speed[RW]
success_rate[RW]
tp_gain[RW]

Public Class Methods

new() click to toggle source
Calls superclass method RPG::BaseItem::new
# File lib/rgss3/rpg.rb, line 458
def initialize
  super
  @scope = 0
  @occasion = 0
  @speed = 0
  @success_rate = 100
  @repeats = 1
  @tp_gain = 0
  @hit_type = 0
  @animation_id = 0
  @damage = RPG::UsableItem::Damage.new
  @effects = []
end

Public Instance Methods

battle_ok?() click to toggle source
# File lib/rgss3/rpg.rb, line 498
def battle_ok?
  [0, 1].include?(@occasion)
end
certain?() click to toggle source
# File lib/rgss3/rpg.rb, line 504
def certain?
  @hit_type == 0
end
for_all?() click to toggle source
# File lib/rgss3/rpg.rb, line 492
def for_all?
  [2, 8, 10].include?(@scope)
end
for_dead_friend?() click to toggle source
# File lib/rgss3/rpg.rb, line 477
def for_dead_friend?
  [9, 10].include?(@scope)
end
for_friend?() click to toggle source
# File lib/rgss3/rpg.rb, line 474
def for_friend?
  [7, 8, 9, 10, 11].include?(@scope)
end
for_one?() click to toggle source
# File lib/rgss3/rpg.rb, line 483
def for_one?
  [1, 3, 7, 9, 11].include?(@scope)
end
for_opponent?() click to toggle source
# File lib/rgss3/rpg.rb, line 471
def for_opponent?
  [1, 2, 3, 4, 5, 6].include?(@scope)
end
for_random?() click to toggle source
# File lib/rgss3/rpg.rb, line 486
def for_random?
  [3, 4, 5, 6].include?(@scope)
end
for_user?() click to toggle source
# File lib/rgss3/rpg.rb, line 480
def for_user?
  @scope == 11
end
magical?() click to toggle source
# File lib/rgss3/rpg.rb, line 510
def magical?
  @hit_type == 2
end
menu_ok?() click to toggle source
need_selection?() click to toggle source
# File lib/rgss3/rpg.rb, line 495
def need_selection?
  [1, 7, 9].include?(@scope)
end
number_of_targets() click to toggle source
# File lib/rgss3/rpg.rb, line 489
def number_of_targets
  for_random? ? @scope - 2 : 0
end
physical?() click to toggle source
# File lib/rgss3/rpg.rb, line 507
def physical?
  @hit_type == 1
end