赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 10206 |
最后登录 | 2014-9-20 |
在线时间 | 36 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 36 小时
- 注册时间
- 2006-8-4
- 帖子
- 375
|
删除这一段 332~410
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
修改这一段 915~940
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 系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|