赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 10619 |
最后登录 | 2018-1-15 |
在线时间 | 154 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 65
- 在线时间
- 154 小时
- 注册时间
- 2011-2-1
- 帖子
- 47
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 tai_tan 于 2014-4-17 12:06 编辑
好吧,我又来问问题了=。=
怪物也产生了,技能也指定了,运行也能进战斗,但是一开打就弹错误
condition_type 错误
这个要用怎样解决呢。。。。
我用的用这段代码给怪物指定的技能,能成功进入战斗了- $data_enemies[8].actions.push [10]
复制代码 是不是把技能加给怪物的同时也要指定condition_type 的类型,要如何指定呢?
定义在这里- class RPG::Enemy < RPG::BaseItem
- def initialize
- super
- @battler_name = ''
- @battler_hue = 0
- @params = [100,0,10,10,10,10,10,10]
- [url=home.php?mod=space&uid=13302]@exp[/url] = 0
- [url=home.php?mod=space&uid=236945]@gold[/url] = 0
- @drop_items = Array.new(3) { RPG::Enemy::DropItem.new }
- @actions = [RPG::Enemy::Action.new]
- @features.push(RPG::BaseItem::Feature.new(22, 0, 0.95))
- @features.push(RPG::BaseItem::Feature.new(22, 1, 0.05))
- @features.push(RPG::BaseItem::Feature.new(31, 1, 0))
- end
- attr_accessor :battler_name
- attr_accessor :battler_hue
- attr_accessor :params
- attr_accessor :exp
- attr_accessor :gold
- attr_accessor :drop_items
- attr_accessor :actions
- end
复制代码 和这里- class RPG::Enemy::Action
- def initialize
- @skill_id = 1
- @condition_type = 0
- @condition_param1 = 0
- @condition_param2 = 0
- @rating = 5
- end
- attr_accessor :skill_id
- attr_accessor :condition_type
- attr_accessor :condition_param1
- attr_accessor :condition_param2
- attr_accessor :rating
- end
复制代码 |
|