赞 | 0 |
VIP | 0 |
好人卡 | 1 |
积分 | 1 |
经验 | 762 |
最后登录 | 2015-8-7 |
在线时间 | 40 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 40 小时
- 注册时间
- 2009-9-3
- 帖子
- 64
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 鬼火 于 2009-9-17 22:36 编辑
如图:“布头巾”原本既不增加也不减少魔力值,可是却显示减少到100。实际不装“布头巾”并不减少魔力值。就是显示魔力值变化时不正确。【其他能力值正常】
能力值变化脚本:- #==============================================================================
- # ■ Window_EquipLeft
- #------------------------------------------------------------------------------
- # 装备画面的、显示角色能力值变化的窗口。
- #==============================================================================
- class Window_nengli < Window_Base
- def up_color
- return Color.new(255, 0, 0)
- end
- def down_color
- return Color.new(0, 255, 0)
- end
- UP_ICON = "048-Skill05"
- DOWN_ICON = "047-Skill04"
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor : 角色
- #--------------------------------------------------------------------------
- def initialize(actor)
- super(130, 28, 194, 420)
- self.windowskin = RPG::Cache.windowskin("../system/menu/windowskins/palskin2")
- self.opacity = 255
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- else
- self.contents.font.size = 18
- self.contents.font.bold = true
- draw_actor_graphic(@actor, 40, 135)
- draw_actor_class(@actor, 90, 20)
- draw_actor_level(@actor, 56, 60)
- draw_actor_state(@actor, 78, 90)
- ###############################################################
- draw_actor_parameter(@actor, -64, 64+64, 0)
- draw_actor_parameter(@actor, -64, 96+64, 1)
- draw_actor_parameter(@actor, -64, 128+64, 2)
- draw_actor_parameter(@actor, -64, 192+32, 3)
- draw_actor_parameter(@actor, -64, 224+32, 4)
- draw_actor_parameter(@actor, -64, 256+32, 5)
- draw_actor_parameter(@actor, -64, 288+32, 6)
- self.contents.draw_text(2, 64+64, 96, 32, "攻击 :")
- self.contents.draw_text(2, 96+64, 96, 32, "物防 :")
- self.contents.draw_text(2, 128+64, 96, 32, "法防 :")
- self.contents.draw_text(2, 160+64, 96, 32, "力量 :")
- self.contents.draw_text(2, 192+64, 96, 32, "灵巧 :")
- self.contents.draw_text(2, 224+64, 96, 32, "速度 :")
- self.contents.draw_text(2, 256+64, 96, 32, "魔力 :")
-
- if @new_atk != nil
- if @new_atk > @actor.atk
- self.contents.blt(100, 64+64+4, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
- elsif @new_atk < @actor.atk
- self.contents.blt(100, 64+64+4, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
- end
- self.contents.font.color = @new_atk>@actor.atk ? up_color : down_color
- self.contents.font.color = normal_color if @new_atk == @actor.atk
- self.contents.draw_text(120, 64+64, 36, 32, @new_atk.to_s, 2)
- end
- if @new_pdef != nil
- if @new_pdef > @actor.pdef
- self.contents.blt(100, 96+64+4, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
- elsif @new_pdef < @actor.pdef
- self.contents.blt(100, 96+64+4, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
- end
- self.contents.font.color = @new_pdef>@actor.pdef ? up_color : down_color
- self.contents.font.color = normal_color if @new_pdef == @actor.pdef
- self.contents.draw_text(120, 96+64, 36, 32, @new_pdef.to_s, 2)
- end
- if @new_mdef != nil
- if @new_mdef > @actor.mdef
- self.contents.blt(100, 128+64+4, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
- elsif @new_mdef < @actor.mdef
- self.contents.blt(100, 128+64+4, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
- end
- self.contents.font.color = @new_mdef>@actor.mdef ? up_color : down_color
- self.contents.font.color = normal_color if @new_mdef == @actor.mdef
- self.contents.draw_text(120, 128+64, 36, 32, @new_mdef.to_s, 2)
- end
- if @new_str != nil
- if @new_str > @actor.str
- self.contents.blt(100, 192+32+4, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
- elsif @new_str < @actor.str
- self.contents.blt(100, 192+32+4, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
- end
- self.contents.font.color = @new_str>@actor.str ? up_color : down_color
- self.contents.font.color = normal_color if @new_str == @actor.str
- self.contents.draw_text(120, 192+32, 36, 32, @new_str.to_s, 2)
- end
- if @new_dex != nil
- if @new_dex > @actor.dex
- self.contents.blt(100, 224+32+4, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
- elsif @new_dex < @actor.dex
- self.contents.blt(100, 224+32+4, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
- end
- self.contents.font.color = @new_dex>@actor.dex ? up_color : down_color
- self.contents.font.color = normal_color if @new_dex == @actor.dex
- self.contents.draw_text(120, 224+32, 36, 32, @new_dex.to_s, 2)
- end
- if @new_agi != nil
- if @new_agi > @actor.agi
- self.contents.blt(100, 256+32+4, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
- elsif @new_agi < @actor.agi
- self.contents.blt(100, 256+32+4, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
- end
- self.contents.font.color = @new_agi>@actor.agi ? up_color : down_color
- self.contents.font.color = normal_color if @new_agi == @actor.agi
- self.contents.draw_text(120, 256+32, 36, 32, @new_agi.to_s, 2)
- end
- if @new_int != nil
- if @new_int > @actor.int
- self.contents.blt(100, 288+32+4, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
- elsif @new_int < @actor.int
- self.contents.blt(100, 288+32+4, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
- end
- self.contents.font.color = @new_int>@actor.int ? up_color : down_color
- self.contents.font.color = normal_color if @new_int == @actor.int
- self.contents.draw_text(120, 288+32, 36, 32, @new_int.to_s, 2)
- end
- end
- #--------------------------------------------------------------------------
- # ● 变更装备后的能力值设置
- # new_atk : 变更装备后的攻击力
- # new_pdef : 变更装备后的物理防御
- # new_mdef : 变更装备后的魔法防御
- #--------------------------------------------------------------------------
- ###############################################################
- def set_new_parameters(new_atk, new_pdef, new_mdef, new_eva, new_str, new_dex, new_agi, new_int)
- if @new_atk != new_atk or @new_pdef !=new_pdef or @new_mdef != new_mdef or @new_eva != new_eva or @new_str != new_str or @new_dex !=new_dex or @new_agi != new_agi or @new_int != new_int
- @new_atk = new_atk
- @new_pdef = new_pdef
- @new_mdef = new_mdef
- @new_eva = new_eva
- @new_str = new_str
- @new_dex = new_dex
- @new_agi = new_agi
- @new_int = new_int
- refresh
- end
- end
- end
复制代码 |
|