class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
def update_help
description = ""
if self.item != nil
description = self.item.description
if !self.item.is_a? RPG::Item
dur_set = item.dur_set
dur = item.dur
description = description + " 耐久度: #{dur}/#{dur_set}"
end
end
@help_window.set_text(description)
end
end
# ===========================================================================
class Window_EquipItem < Window_Selectable
#--------------------------------------------------------------------------
def update_help
description = ""
if self.item != nil
description = self.item.description
dur_set = item.dur_set
dur = item.dur
description = description + " 耐久度: #{dur}/#{dur_set}"
end
@help_window.set_text(description)
end
end
# ===========================================================================
class Window_EquipRight < Window_Selectable
#--------------------------------------------------------------------------
def update_help
description = ""
if self.item != nil
description = self.item.description
dur_set = item.dur_set
dur = item.dur
description = description + " 耐久度: #{dur}/#{dur_set}"
end
@help_window.set_text(description)
end
end
#==============================================================================
class Window_ShopBuy < Window_Selectable
#--------------------------------------------------------------------------
def update_help
description = ""
if self.item != nil
description = self.item.description
if !self.item.is_a? RPG::Item
dur_set = item.dur_set
dur = item.dur
description = description + " 耐久度: #{dur}/#{dur_set}"
end
end
@help_window.set_text(description)
end
end
#==============================================================================
class Window_ShopSell < Window_Selectable
#--------------------------------------------------------------------------
def update_help
description = ""
if self.item != nil
description = self.item.description
if !self.item.is_a? RPG::Item
dur_set = item.dur_set
dur = item.dur
description = description + " 耐久度: #{dur}/#{dur_set}"
end
end
@help_window.set_text(description)
end
end
module RPG
class Weapon
attr_accessor :dur_set
attr_accessor :dur
def name
name = @name.split(/,/)[0]
return name != nil ? name + " 耐久度: #{dur}/#{dur_set}" : ''
end
def dur_set
dur_set = @name.split(/,/)[1]
return dur_set != nil ? dur_set.to_i : 0
end
end
class Armor
attr_accessor :dur_set
attr_accessor :dur
def name
name = @name.split(/,/)[0]
return name != nil ? name + " 耐久度: #{dur}/#{dur_set}" : ''
end
def dur_set
dur_set = @name.split(/,/)[1]
return dur_set != nil ? dur_set.to_i : 0
end
end
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |