赞 | 2 |
VIP | 0 |
好人卡 | 0 |
积分 | 13 |
经验 | 190 |
最后登录 | 2024-11-14 |
在线时间 | 82 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 1335
- 在线时间
- 82 小时
- 注册时间
- 2017-9-5
- 帖子
- 110
|
6楼
楼主 |
发表于 2024-10-14 16:41:32
|
只看该作者
def set_b_add_status #爆种
return unless $game_party.in_battle
read_1 = battler_add_ability(10)
@battle_add_status = [] unless @battle_add_status
for param in 2..7
@battle_add_status[param] = 0 unless @battle_add_status[param]
if read_1[0] > (self.hp * 100 / self.mhp)
@battle_add_status[param] += read_1[1]
end
end
def battler_add_ability(id) # 备注
battler_add = Array.new
cheak_note = ""
cheak_note = @note if @note
when 10
read_arr = Array.new
while cheak_note do
cheak_note.match(/<SEED\s?(\d+)\s?,\s?(\d+)%\s?>/)
if $1 && $2
read_arr.push([$1.to_i, $2.to_i])
end
cheak_note = $'
end
battler_add = read_arr
def battler_add_ability(add_ability_id) # 备注判定
all_list = Array.new
if actor?
actor = call_job_cache(1, add_ability_id)
equip = call_equip_cache(1, add_ability_id)
passive = passive_skills.collect{|obj| obj.battler_add_ability(add_ability_id)}
sta = states.collect{|obj| obj.battler_add_ability(add_ability_id)}
all_list += actor + equip + passive + sta
end
if enemy?
enemy_e = [$data_enemies[@enemy_id].battler_add_ability(add_ability_id)]
sta_e = states.collect{|obj| obj.battler_add_ability(add_ability_id)}
all_list += enemy_e + sta_e
end
all_list.flatten!
value = 0
case add_ability_id
when 10
value = [0,0]
for list in 0..all_list.size - 1
if list % 2 == 0
if all_list[list] && all_list[list + 1]
if all_list[list + 1] > value[1]
value[0] = all_list[list]
value[1] = all_list[list + 1]
end
end
end
end
def param_base(param_id) #基础能力值
base_class = $data_actors[@actor_id].base_param_index
if base_class == 0
class_base = self.class.params[param_id, @level]
else
class_base = $data_classes[base_class].params[param_id, @level]
end
sub_class_base = 0 #副职业
if KURE::BaseScript::USE_JOBLv == 1
sub_class_base = self.sub_class.params[param_id, @sub_class_level] if @sub_class_id != 0
sub_class_base = sub_class_base * KURE::JobLvSystem::SUB_CLASS_STATUS_RATE
class_base = class_base * KURE::JobLvSystem::MAIN_CLASS_STATUS_RATE if @sub_class_id != 0
end
param_plus_base = 0 #加算能力
if @param_plus && @param_plus[param_id]
param_plus_base = @param_plus[param_id]
end
passive_base = 0 # 被动
for i in 0..passive_skills.size - 1
passive_base += passive_skills[i].params[param_id] if passive_skills[i].kind_of?(RPG::EquipItem)
end
status_divide_base = 0 # 状态
if @status_divide && @status_divide[param_id]
status_divide_base = @status_divide[param_id]
end
battle_add = 0 # 爆种能力
if @battle_add_status && @battle_add_status[param_id]
battle_add = @battle_add_status[param_id]
end
sum = class_base + sub_class_base + param_plus_base + passive_base + status_divide_base # 合计
sum *= 1 + battle_add
return sum.to_i
end |
|