赞 | 4 |
VIP | 0 |
好人卡 | 0 |
积分 | 78 |
经验 | 15725 |
最后登录 | 2024-11-10 |
在线时间 | 1337 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7760
- 在线时间
- 1337 小时
- 注册时间
- 2015-8-15
- 帖子
- 751
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 金芒芒 于 2016-3-6 20:28 编辑
#============================================================================== # ■ Window_EquipLeft #------------------------------------------------------------------------------ # 装备画面的、显示角色能力值变化的窗口。 #============================================================================== class Window_Equip_left < Window_Base #-------------------------------------------------------------------------- # ● 初始化对像 # actor : 角色 #-------------------------------------------------------------------------- def initialize(actor) super(336, 84, 600, 600) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = 20 @actor = actor @color1 = normal_color @color2 = normal_color @color3 = normal_color @color4 = normal_color @color5 = normal_color @color6 = normal_color refresh end def set_actor(actor) @actor = actor refresh end def set_parameters_color(color1 = normal_color,color2 = normal_color,color3 = normal_color,color4 = normal_color,color5 = normal_color,color6 = normal_color) @color1 = color1 @color2 = color2 @color3 = color3 @color4 = color4 @color5 = color5 refresh end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear #################### upordown_x = 156 equipopacity_u = 0 equipopacity_d = 0 c = 20 cc = 60 #################### # draw_walk_actor_graphic(@actor, 108, 60)##################### #draw_actor_name(@actor, 0, 0) contents.font.color = Color.new(255, 255, 255, 255) contents.font.size = 12 #字体大小调解 draw_actor_parameter_new(@actor, 0, 48, 0) draw_actor_parameter_new(@actor, 0, 45 + c, 1) draw_actor_parameter_new(@actor, 0, 45 + 2*c, 2) # draw_actor_level_new(@actor, 0, 32, @color1) draw_actor_parameter_new(@actor, 0, 45 + 3*c, 3, @color2) draw_actor_parameter_new(@actor, 0, 45 + 4*c, 4, @color3) draw_actor_parameter_new(@actor, 0, 45 + 5*c, 5, @color4) draw_actor_parameter_new(@actor, 0, 45 + 6*c, 6, @color5) contents.font.color = Color.new(210, 250, 235, 200) self.contents.draw_text(0, 180, 64, 32, "兵力") contents.font.color = Color.new(255, 255, 255, 255) self.contents.draw_text(-5, 180, 84, 32, @actor.maxhp.to_s,2) # 攻击力 if @new_atk != nil if actor_parameter(@actor,0) > @new_atk equipopacity_u = 0 equipopacity_d = 255 e_atk = actor_parameter(@actor,0) - @new_atk cx = contents.text_size(e_atk.to_s).width equip_color = down_color elsif actor_parameter(@actor,0) < @new_atk equipopacity_u = 255 equipopacity_d = 0 e_atk = @new_atk - actor_parameter(@actor,0) cx = contents.text_size(e_atk.to_s).width equip_color = up_color else equipopacity_u = 0 equipopacity_d = 0 end bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 54, bitmap, src_rect,equipopacity_u) bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 54, bitmap, src_rect,equipopacity_d) if @new_atk != actor_parameter(@actor,0) self.contents.font.color = equip_color self.contents.draw_text(68+c+12, 48, 36, 32, e_atk.to_s, 2) end end # 物理防御 if @new_pdef != nil if actor_parameter(@actor,1) > @new_pdef equipopacity_u = 0 equipopacity_d = 255 e_pdef = actor_parameter(@actor,1) - @new_pdef cx = contents.text_size(e_pdef.to_s).width equip_color = down_color elsif actor_parameter(@actor,1) < @new_pdef equipopacity_u = 255 equipopacity_d = 0 e_pdef = @new_pdef - actor_parameter(@actor,1) cx = contents.text_size(e_pdef.to_s).width equip_color = up_color else equipopacity_u = 0 equipopacity_d = 0 end bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c,51+c, bitmap, src_rect,equipopacity_u) bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 51+c, bitmap, src_rect,equipopacity_d) if actor_parameter(@actor,1) != @new_pdef self.contents.font.color = equip_color self.contents.draw_text(68+c+12, 46+c, 36, 32, e_pdef.to_s, 2) end end # 魔法防御 if @new_mdef != nil if actor_parameter(@actor,2) > @new_mdef equipopacity_u = 0 equipopacity_d = 255 e_mdef = actor_parameter(@actor,2) - @new_mdef cx = contents.text_size(e_mdef.to_s).width equip_color = down_color elsif actor_parameter(@actor,2) < @new_mdef equipopacity_u = 255 equipopacity_d = 0 e_mdef = @new_mdef - actor_parameter(@actor,2) cx = contents.text_size(e_mdef.to_s).width equip_color = up_color else equipopacity_u = 0 equipopacity_d = 0 end bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 94 + 2*c, bitmap, src_rect,equipopacity_u) bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 94 + 2*c, bitmap, src_rect,equipopacity_d) if actor_parameter(@actor,2) != @new_mdef self.contents.font.color = equip_color self.contents.draw_text(68+c+12, 46 + 2*c, 36, 32, e_mdef.to_s, 2) end end # 力量 if @new_str != nil if actor_parameter(@actor,3) > @new_str equipopacity_u = 0 equipopacity_d = 255 e_str = actor_parameter(@actor,3) - @new_str cx = contents.text_size(e_str.to_s).width equip_color = down_color elsif actor_parameter(@actor,3) < @new_str equipopacity_u = 255 equipopacity_d = 0 e_str = @new_str - actor_parameter(@actor,3) cx = contents.text_size(e_str.to_s).width equip_color = up_color else equipopacity_u = 0 equipopacity_d = 0 end bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 118 + 3*c, bitmap, src_rect,equipopacity_u) bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 118 + 3*c, bitmap, src_rect,equipopacity_d) if actor_parameter(@actor,3) != @new_str self.contents.font.color = equip_color self.contents.draw_text(68+c+12, 46+ 3*c, 36, 32, e_str.to_s, 2) end end # 灵巧 if @new_dex != nil if actor_parameter(@actor,4) > @new_dex equipopacity_u = 0 equipopacity_d = 255 e_dex = actor_parameter(@actor,4) - @new_dex cx = contents.text_size(e_dex.to_s).width equip_color = down_color elsif actor_parameter(@actor,4) < @new_dex equipopacity_u = 255 equipopacity_d = 0 e_dex = @new_dex - actor_parameter(@actor,4) cx = contents.text_size(e_dex.to_s).width equip_color = up_color else equipopacity_u = 0 equipopacity_d = 0 end bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 130+4*c, bitmap, src_rect,equipopacity_u) bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 130+4*c, bitmap, src_rect,equipopacity_d) if actor_parameter(@actor,4) != @new_dex self.contents.font.color = equip_color self.contents.draw_text(68+c+12, 46+4*c, 36, 32, e_dex.to_s, 2) end end # 速度 if @new_agi != nil if actor_parameter(@actor,5) > @new_agi equipopacity_u = 0 equipopacity_d = 255 e_agi = actor_parameter(@actor,5) - @new_agi cx = contents.text_size(e_agi.to_s).width equip_color = down_color elsif actor_parameter(@actor,5) < @new_agi equipopacity_u = 255 equipopacity_d = 0 e_agi = @new_agi - actor_parameter(@actor,5) cx = contents.text_size(e_agi.to_s).width equip_color = up_color else equipopacity_u = 0 equipopacity_d = 0 end bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 142+5*c, bitmap, src_rect,equipopacity_u) bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 142+5*c, bitmap, src_rect,equipopacity_d) if actor_parameter(@actor,5) != @new_agi self.contents.font.color = equip_color self.contents.draw_text(68+c+12, 46+5*c, 36, 32, e_agi.to_s, 2) end end # 魔力 if @new_int != nil if actor_parameter(@actor,6) > @new_int equipopacity_u = 0 equipopacity_d = 255 e_int = actor_parameter(@actor,6) - @new_int cx = contents.text_size(e_int.to_s).width equip_color = down_color elsif actor_parameter(@actor,6) < @new_int equipopacity_u = 255 equipopacity_d = 0 e_int = @new_int - actor_parameter(@actor,6) cx = contents.text_size(e_int.to_s).width equip_color = up_color else equipopacity_u = 0 equipopacity_d = 0 end bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 0+6*c, bitmap, src_rect,equipopacity_u) bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png") cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(68+c, 0+6*c, bitmap, src_rect,equipopacity_d) if actor_parameter(@actor,6) != @new_int self.contents.font.color = equip_color self.contents.draw_text(68+c+12, 46+6*c, 36, 32, e_int.to_s, 2) end if @new_hp != nil n = @new_hp - @actor.maxhp color = n > 0 ? text_color(3) : n < 0 ? text_color(2) : normal_color self.contents.font.color = color self.contents.draw_text(32, 120, 40, 32, "+", 1) self.contents.draw_text(64, 150, 56, 32, @new_hp.to_s, 2) end end end #-------------------------------------------------------------------------- # ● 变更装备后的能力值设置 # new_atk : 变更装备后的攻击力 # new_pdef : 变更装备后的物理防御 # new_mdef : 变更装备后的魔法防御 #-------------------------------------------------------------------------- def set_new_parameters(new_hp,new_atk, new_pdef, new_mdef,new_str,new_dex,new_agi,new_int) if @new_hp != new_hp or @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int @new_hp = new_hp @new_atk = new_atk @new_pdef = new_pdef @new_mdef = new_mdef @new_str = new_str @new_dex = new_dex @new_agi = new_agi @new_int = new_int refresh end end end
#==============================================================================
# ■ Window_EquipLeft
#------------------------------------------------------------------------------
# 装备画面的、显示角色能力值变化的窗口。
#==============================================================================
class Window_Equip_left < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
#--------------------------------------------------------------------------
def initialize(actor)
super(336, 84, 600, 600)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 20
@actor = actor
@color1 = normal_color
@color2 = normal_color
@color3 = normal_color
@color4 = normal_color
@color5 = normal_color
@color6 = normal_color
refresh
end
def set_actor(actor)
@actor = actor
refresh
end
def set_parameters_color(color1 = normal_color,color2 = normal_color,color3 = normal_color,color4 = normal_color,color5 = normal_color,color6 = normal_color)
@color1 = color1
@color2 = color2
@color3 = color3
@color4 = color4
@color5 = color5
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
####################
upordown_x = 156
equipopacity_u = 0
equipopacity_d = 0
c = 20
cc = 60
####################
# draw_walk_actor_graphic(@actor, 108, 60)#####################
#draw_actor_name(@actor, 0, 0)
contents.font.color = Color.new(255, 255, 255, 255)
contents.font.size = 12 #字体大小调解
draw_actor_parameter_new(@actor, 0, 48, 0)
draw_actor_parameter_new(@actor, 0, 45 + c, 1)
draw_actor_parameter_new(@actor, 0, 45 + 2*c, 2)
# draw_actor_level_new(@actor, 0, 32, @color1)
draw_actor_parameter_new(@actor, 0, 45 + 3*c, 3, @color2)
draw_actor_parameter_new(@actor, 0, 45 + 4*c, 4, @color3)
draw_actor_parameter_new(@actor, 0, 45 + 5*c, 5, @color4)
draw_actor_parameter_new(@actor, 0, 45 + 6*c, 6, @color5)
contents.font.color = Color.new(210, 250, 235, 200)
self.contents.draw_text(0, 180, 64, 32, "兵力")
contents.font.color = Color.new(255, 255, 255, 255)
self.contents.draw_text(-5, 180, 84, 32, @actor.maxhp.to_s,2)
# 攻击力
if @new_atk != nil
if actor_parameter(@actor,0) > @new_atk
equipopacity_u = 0
equipopacity_d = 255
e_atk = actor_parameter(@actor,0) - @new_atk
cx = contents.text_size(e_atk.to_s).width
equip_color = down_color
elsif actor_parameter(@actor,0) < @new_atk
equipopacity_u = 255
equipopacity_d = 0
e_atk = @new_atk - actor_parameter(@actor,0)
cx = contents.text_size(e_atk.to_s).width
equip_color = up_color
else
equipopacity_u = 0
equipopacity_d = 0
end
bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 54, bitmap, src_rect,equipopacity_u)
bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 54, bitmap, src_rect,equipopacity_d)
if @new_atk != actor_parameter(@actor,0)
self.contents.font.color = equip_color
self.contents.draw_text(68+c+12, 48, 36, 32, e_atk.to_s, 2)
end
end
# 物理防御
if @new_pdef != nil
if actor_parameter(@actor,1) > @new_pdef
equipopacity_u = 0
equipopacity_d = 255
e_pdef = actor_parameter(@actor,1) - @new_pdef
cx = contents.text_size(e_pdef.to_s).width
equip_color = down_color
elsif actor_parameter(@actor,1) < @new_pdef
equipopacity_u = 255
equipopacity_d = 0
e_pdef = @new_pdef - actor_parameter(@actor,1)
cx = contents.text_size(e_pdef.to_s).width
equip_color = up_color
else
equipopacity_u = 0
equipopacity_d = 0
end
bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c,51+c, bitmap, src_rect,equipopacity_u)
bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 51+c, bitmap, src_rect,equipopacity_d)
if actor_parameter(@actor,1) != @new_pdef
self.contents.font.color = equip_color
self.contents.draw_text(68+c+12, 46+c, 36, 32, e_pdef.to_s, 2)
end
end
# 魔法防御
if @new_mdef != nil
if actor_parameter(@actor,2) > @new_mdef
equipopacity_u = 0
equipopacity_d = 255
e_mdef = actor_parameter(@actor,2) - @new_mdef
cx = contents.text_size(e_mdef.to_s).width
equip_color = down_color
elsif actor_parameter(@actor,2) < @new_mdef
equipopacity_u = 255
equipopacity_d = 0
e_mdef = @new_mdef - actor_parameter(@actor,2)
cx = contents.text_size(e_mdef.to_s).width
equip_color = up_color
else
equipopacity_u = 0
equipopacity_d = 0
end
bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 94 + 2*c, bitmap, src_rect,equipopacity_u)
bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 94 + 2*c, bitmap, src_rect,equipopacity_d)
if actor_parameter(@actor,2) != @new_mdef
self.contents.font.color = equip_color
self.contents.draw_text(68+c+12, 46 + 2*c, 36, 32, e_mdef.to_s, 2)
end
end
# 力量
if @new_str != nil
if actor_parameter(@actor,3) > @new_str
equipopacity_u = 0
equipopacity_d = 255
e_str = actor_parameter(@actor,3) - @new_str
cx = contents.text_size(e_str.to_s).width
equip_color = down_color
elsif actor_parameter(@actor,3) < @new_str
equipopacity_u = 255
equipopacity_d = 0
e_str = @new_str - actor_parameter(@actor,3)
cx = contents.text_size(e_str.to_s).width
equip_color = up_color
else
equipopacity_u = 0
equipopacity_d = 0
end
bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 118 + 3*c, bitmap, src_rect,equipopacity_u)
bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 118 + 3*c, bitmap, src_rect,equipopacity_d)
if actor_parameter(@actor,3) != @new_str
self.contents.font.color = equip_color
self.contents.draw_text(68+c+12, 46+ 3*c, 36, 32, e_str.to_s, 2)
end
end
# 灵巧
if @new_dex != nil
if actor_parameter(@actor,4) > @new_dex
equipopacity_u = 0
equipopacity_d = 255
e_dex = actor_parameter(@actor,4) - @new_dex
cx = contents.text_size(e_dex.to_s).width
equip_color = down_color
elsif actor_parameter(@actor,4) < @new_dex
equipopacity_u = 255
equipopacity_d = 0
e_dex = @new_dex - actor_parameter(@actor,4)
cx = contents.text_size(e_dex.to_s).width
equip_color = up_color
else
equipopacity_u = 0
equipopacity_d = 0
end
bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 130+4*c, bitmap, src_rect,equipopacity_u)
bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 130+4*c, bitmap, src_rect,equipopacity_d)
if actor_parameter(@actor,4) != @new_dex
self.contents.font.color = equip_color
self.contents.draw_text(68+c+12, 46+4*c, 36, 32, e_dex.to_s, 2)
end
end
# 速度
if @new_agi != nil
if actor_parameter(@actor,5) > @new_agi
equipopacity_u = 0
equipopacity_d = 255
e_agi = actor_parameter(@actor,5) - @new_agi
cx = contents.text_size(e_agi.to_s).width
equip_color = down_color
elsif actor_parameter(@actor,5) < @new_agi
equipopacity_u = 255
equipopacity_d = 0
e_agi = @new_agi - actor_parameter(@actor,5)
cx = contents.text_size(e_agi.to_s).width
equip_color = up_color
else
equipopacity_u = 0
equipopacity_d = 0
end
bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 142+5*c, bitmap, src_rect,equipopacity_u)
bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 142+5*c, bitmap, src_rect,equipopacity_d)
if actor_parameter(@actor,5) != @new_agi
self.contents.font.color = equip_color
self.contents.draw_text(68+c+12, 46+5*c, 36, 32, e_agi.to_s, 2)
end
end
# 魔力
if @new_int != nil
if actor_parameter(@actor,6) > @new_int
equipopacity_u = 0
equipopacity_d = 255
e_int = actor_parameter(@actor,6) - @new_int
cx = contents.text_size(e_int.to_s).width
equip_color = down_color
elsif actor_parameter(@actor,6) < @new_int
equipopacity_u = 255
equipopacity_d = 0
e_int = @new_int - actor_parameter(@actor,6)
cx = contents.text_size(e_int.to_s).width
equip_color = up_color
else
equipopacity_u = 0
equipopacity_d = 0
end
bitmap = Bitmap.new(PATH_OF_IMAGES + "up.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 0+6*c, bitmap, src_rect,equipopacity_u)
bitmap = Bitmap.new(PATH_OF_IMAGES + "down.png")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(68+c, 0+6*c, bitmap, src_rect,equipopacity_d)
if actor_parameter(@actor,6) != @new_int
self.contents.font.color = equip_color
self.contents.draw_text(68+c+12, 46+6*c, 36, 32, e_int.to_s, 2)
end
if @new_hp != nil
n = @new_hp - @actor.maxhp
color = n > 0 ? text_color(3) : n < 0 ? text_color(2) : normal_color
self.contents.font.color = color
self.contents.draw_text(32, 120, 40, 32, "+", 1)
self.contents.draw_text(64, 150, 56, 32, @new_hp.to_s, 2)
end
end
end
#--------------------------------------------------------------------------
# ● 变更装备后的能力值设置
# new_atk : 变更装备后的攻击力
# new_pdef : 变更装备后的物理防御
# new_mdef : 变更装备后的魔法防御
#--------------------------------------------------------------------------
def set_new_parameters(new_hp,new_atk, new_pdef, new_mdef,new_str,new_dex,new_agi,new_int)
if @new_hp != new_hp or @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int
@new_hp = new_hp
@new_atk = new_atk
@new_pdef = new_pdef
@new_mdef = new_mdef
@new_str = new_str
@new_dex = new_dex
@new_agi = new_agi
@new_int = new_int
refresh
end
end
end
|
评分
-
查看全部评分
|