赞 | 0 |
VIP | 5 |
好人卡 | 14 |
积分 | 15 |
经验 | 110639 |
最后登录 | 2015-10-15 |
在线时间 | 1157 小时 |
Lv3.寻梦者 小柯的徒弟
- 梦石
- 0
- 星屑
- 1535
- 在线时间
- 1157 小时
- 注册时间
- 2008-5-24
- 帖子
- 3085
|
- class Game_Battler
- TURN_PLUS = {1=>[5,5]}#——①:技能编号、②③:提高随机数范围。
- alias lv12_initialize initialize
- def initialize
- @states_plus_turn = {}
- lv12_initialize
- end
- alias lv12_skill_effect skill_effect
- def skill_effect(user, skill)
- if TURN_PLUS.keys.include?(skill.id)
- for i in @states
- z = TURN_PLUS[skill.id]
- @states_plus_turn[i] = (rand(z[1]-z[0])+z[0]) + @states_plus_turn[i]
- end
- end
- lv12_skill_effect(user, skill)
- end
- alias lv12_add_state add_state
- def add_state(state_id, force = false)
- b = @states_turn.clone
- c = {}
- for i in @states_turn.keys
- if states_plus_turn(i) != 0
- c[i] = true
- end
- end
- a = lv12_add_state(state_id,force)
- for i in @states_plus_turn.keys
- @states_turn[i] = b[i] if c[i] == true
- end
- return a
- end
- alias lv12_states_minus states_minus
- def states_minus(minus_state_set)
- for i in minus_state_set
- @states_plus_turn[i] = nil
- end
- return lv12_states_minus(minus_state_set)
- end
- def state_full?(state_id)
- unless self.state?(state_id)
- return false
- end
- if @states_turn[state_id] == -1
- return true
- end
- return @states_turn[state_id] + states_plus_turn(state_id) == $data_states[state_id].hold_turn
- end
- def states_plus_turn(id)
- @states_plus_turn[id] = 0 if @states_plus_turn[id] == nil or @states_plus_turn[id] < 0
- if @states_plus_turn[id] == nil
- return 0
- else
- return @states_plus_turn[id]
- end
- end
- def remove_states_auto
- for i in @states_turn.keys.clone
- if @states_turn[i]+states_plus_turn(i) > 0
- if states_plus_turn(i) > 0
- @states_plus_turn[i] = states_plus_turn(i) - 1
- return
- end
- @states_turn[i] -= 1
- elsif rand(100) < $data_states[i].auto_release_prob
- remove_state(i)
- end
- end
- end
- end
复制代码 状态延续没问题,是因为被论坛吞掉了一些字符……所以出错了……><
效果扩散貌似没问题啊……技能攻击都可以打全部的人…… |
|