赞 | 0 |
VIP | 5 |
好人卡 | 14 |
积分 | 15 |
经验 | 110639 |
最后登录 | 2015-10-15 |
在线时间 | 1157 小时 |
Lv3.寻梦者 小柯的徒弟
- 梦石
- 0
- 星屑
- 1535
- 在线时间
- 1157 小时
- 注册时间
- 2008-5-24
- 帖子
- 3085
|
本帖最后由 「旅」 于 2009-8-29 13:41 编辑
- class Game_Battler
- alias lv12_initialize initialize
- def initialize
- @states_plus_turn = {}
- lv12_initialize
- end
- alias lv12_skill_effect skill_effect
- def skill_effect(user, skill)
- @jionglansan = true
- lv12_skill_effect(user, skill)
- @jionglansan = false
- end
- alias lv12_add_state add_state
- def add_state(state_id, force = false)
- if @jionglansan
- i = state_id
- @states_plus_turn[i] = -$data_states[i].hold_turn if @states_plus_turn[i] == nil
- @states_plus_turn[i] = $data_states[i].hold_turn + @states_plus_turn[i]
- end
- 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
复制代码 状态延续的,终于折腾出来了……
那个抱歉,以为是同个问题所以合并了,我去试试有没办法解决第二个问题吧…… |
|