设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 959|回复: 1
打印 上一主题 下一主题

谁能帮我看懂我当初这么写的意思?

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
0 小时
注册时间
2006-10-17
帖子
112
跳转到指定楼层
1
发表于 2008-5-29 01:33:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
  1.     for i in @states
  2.      beishu=1 #默认为1
  3.      if $data_states[i].guard_element_set.include?(70)
  4.        beishu= 2
  5.      elsif $data_states[i].guard_element_set.include?(71)
  6.        beishu= 3
  7.      elsif $data_states[i].guard_element_set.include?(72)
  8.        beishu= 4
  9.      elsif $data_states[i].guard_element_set.include?(73)
  10.        beishu= 5
  11.      elsif $data_states[i].guard_element_set.include?(80)
  12.        beishu= 6
  13.      elsif $data_states[i].guard_element_set.include?(81)
  14.        beishu= 7
  15.      elsif $data_states[i].guard_element_set.include?(82)
  16.        beishu= 8
  17.      elsif $data_states[i].guard_element_set.include?(83)
  18.        beishu= 9
  19.      elsif $data_states[i].guard_element_set.include?(84)
  20.        beishu= 10
  21.      elsif $data_states[i].guard_element_set.include?(75)
  22.        beishu= -1
  23.      elsif $data_states[i].guard_element_set.include?(77)
  24.        beishu= -2
  25.      end
  26.      if $data_states[i].guard_element_set.include?(state_id+100)
  27.        result -= 5*beishu #仅当本状态防御时才有效
  28.       if result > 100 then result= 100
  29.       elsif result < -100 then result = -100
  30.       end
  31.      end
复制代码




谁能明白为什么最后的state_id后要+100呢?
我自己想了半天没想明白。。。
我的博客:http://golden124.bokee.com

Lv1.梦旅人

梦石
0
星屑
55
在线时间
0 小时
注册时间
2006-10-17
帖子
112
2
 楼主| 发表于 2008-5-29 01:51:36 | 只看该作者
瞬间顿悟。。。
我的博客:http://golden124.bokee.com
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-8-1 22:29

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表