| 赞 | 4 |
| VIP | |
| 好人卡 | |
| 积分 | 7 |
| 经验 | |
| 最后登录 | 2013-8-9 |
| 在线时间 | 184 小时 |
天仙
- 梦石
- 0
- 星屑
- 720
- 在线时间
- 184 小时
- 注册时间
- 2008-4-15
- 回帖
- 4872

|
发表于 2008-8-14 18:53:27
|
显示全部楼层
- class RPG::Weapon < RPG::BaseItem
- def mdfpl
- self.note.mplit(/[\r\n]+/).each { |line|
- if line =~ /\[抗性 \d+\]/
- a = line.mplit(/ /)[1]
- d = ""
- while ((c = a.slice!(/./m)) != nil)
- d += c if c.is_a?(Integer)
- end
- end
- }
- return d ? d.to_i : nil
- end
- end
复制代码
之後就能使用 $data_weapons[N].mdfpl来获取该值了 |
|