查看: 1539|回复: 3

能否帮我详细解读下这段基本脚本?谢谢!

  [复制链接]
梦石
0
星屑
50
在线时间
2 小时
注册时间
2007-5-21
回帖
87
发表于 2008-3-18 08:10:15 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
#--------------------------------------------------------------------------
  # ● 应用道具的成长效果
  #     user : 使用者
  #     item : 道具
  #--------------------------------------------------------------------------
  def item_growth_effect(user, item)
    if item.parameter_type > 0 and item.parameter_points != 0
      case item.parameter_type
      when 1  # MaxHP
        @maxhp_plus += item.parameter_points
      when 2  # MaxMP
        @maxmp_plus += item.parameter_points
      when 3  # 攻击力
        @atk_plus += item.parameter_points
      when 4  # 防御力
        @def_plus += item.parameter_points
      when 5  # 精神力
        @spi_plus += item.parameter_points
      when 6  # 敏捷性
        @agi_plus += item.parameter_points
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 应用连续伤害的效果
  #--------------------------------------------------------------------------
  def slip_damage_effect
    if slip_damage? and @hp > 0
      @hp_damage = apply_variance(maxhp / 10, 10)
      @hp_damage = @hp - 1 if @hp_damage >= @hp
      self.hp -= @hp_damage
    end
  end
end


以上究竟是什么意思呢?又如何使用呢?谢谢!
此贴于 2008-4-17 1:07:25 被版主snstar2006提醒,请楼主看到后对本贴做出回应。
版务信息:版主帮忙结贴~
囧到地老天荒 渣到天崩地裂 呆到海枯石烂 痴到枯木还春 无限期收购好人卡中,有的MM
头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-2-18
回帖
1385
发表于 2008-3-18 08:50:46 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复

使用道具 举报

梦石
0
星屑
50
在线时间
2 小时
注册时间
2007-5-21
回帖
87
 楼主| 发表于 2008-3-18 23:38:46 | 显示全部楼层
哦!很感谢哦!
我还想请教下...分散度的作用是什么?能起什么效果?

我如果想做个连击很多下的技能,应该如何入手呢?
囧到地老天荒 渣到天崩地裂 呆到海枯石烂 痴到枯木还春 无限期收购好人卡中,有的MM
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-2-18
回帖
1385
发表于 2008-3-19 00:25:48 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部