#==============================================================================
# ** Scene_Equip
#------------------------------------------------------------------------------
# This class performs the equipment screen processing.
#==============================================================================
class Scene_Equip < Scene_Base
#--------------------------------------------------------------------------
# * Update Status Window !OVERRIDE!
#--------------------------------------------------------------------------
def update_status_window
if @equip_window.active
@status_window.set_new_parameters(nil, nil, nil, nil)
elsif @item_window.active
return if @item_window.item.nil?
temp_actor = @actor.clone
temp_actor.change_equip(@equip_window.index, @item_window.item, true)
new_atk = temp_actor.atk
new_def = temp_actor.def
new_spi = temp_actor.spi
new_agi = temp_actor.agi
@status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi)
end
@status_window.update
end
#--------------------------------------------------------------------------
# * Update Item Selection !OVERRIDE!
#--------------------------------------------------------------------------
def update_item_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@equip_window.active = true
@item_window.active = false
@item_window.index = -1
elsif Input.trigger?(Input::C)
return if @item_window.item.nil?
Sound.play_equip
@actor.change_equip(@equip_window.index, @item_window.item)
@equip_window.active = true
@item_window.active = false
@item_window.index = -1
@equip_window.refresh
for item_window in @item_windows
item_window.refresh
end
end
end
end