赞 | 0 |
VIP | 35 |
好人卡 | 32 |
积分 | 8 |
经验 | 37746 |
最后登录 | 2024-12-3 |
在线时间 | 926 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 840
- 在线时间
- 926 小时
- 注册时间
- 2011-5-11
- 帖子
- 440
|
本帖最后由 345912390 于 2013-9-11 08:18 编辑
做限制的脚本不知道, 不过可以做添加,当角色升级后加入某一特性
脚本原理结构如下,可能有错,自己修改吧!- class Game_Actor < Game_Battler
- alias old_level_up level_up
- def level_up
- old_level_up#这个地方可以用原来的 level_up的内容,但其测试结果的有细微差别,原因我就不清楚了!
- case @actor_id#判断升级角色
- when 1
- case @level#判断等级
- when 10
- self.actor.features.push(RPG::BaseItem::Feature.new(21,0, 10))
- when 20
- self.actor.features.push(RPG::BaseItem::Feature.new(22,1, 0.95))
- when 30
- self.actor.features.push(RPG::BaseItem::Feature.new(22, 1, 0.05))
- when 40
- self.actor.features.push(RPG::BaseItem::Feature.new(22, 2, 0.04))
- else
-
- end
- when 2
- case @level#判断等级
- when 10
- self.actor.features.push(RPG::BaseItem::Feature.new(23, 0, 1))
- when 20
- self.actor.features.push(RPG::BaseItem::Feature.new(22, 0, 0.95))
- when 30
- self.actor.features.push(RPG::BaseItem::Feature.new(22, 1, 0.05))
- when 40
- self.actor.features.push(RPG::BaseItem::Feature.new(22, 2, 0.04))
- end
- when 3
- case @level#判断等级
- when 10
- self.actor.features.push(RPG::BaseItem::Feature.new(23, 0, 1))
- when 20
- self.actor.features.push(RPG::BaseItem::Feature.new(22, 0, 0.95))
- when 30
- self.actor.features.push(RPG::BaseItem::Feature.new(22, 1, 0.05))
- when 40
- self.actor.features.push(RPG::BaseItem::Feature.new(22, 2, 0.04))
- end
- when 4
- case @level#判断等级
- when 10
- self.actor.features.push(RPG::BaseItem::Feature.new(23, 0, 1))
- when 20
- self.actor.features.push(RPG::BaseItem::Feature.new(22, 0, 0.95))
- when 30
- self.actor.features.push(RPG::BaseItem::Feature.new(22, 1, 0.05))
- when 40
- self.actor.features.push(RPG::BaseItem::Feature.new(22, 2, 0.04))
- end
- end
- end
- end
复制代码 |
评分
-
查看全部评分
|