def combo_ok?(actor)
all_attck_skill_max = ALL_ATTCK_SKILL_MAX
# 行动者要是敌人还false
if actor.is_a?(Game_Enemy)
return false
end
# 行动者如果是特级以外的行动还false
if actor.current_action.kind != 1
return false
end
# 行动者如果不能使用特级还false
unless actor.skill_can_use?(actor.current_action.skill_id)
return false
end
# 取得特级
skill = $data_skills[actor.current_action.skill_id]
# 使用特级如果有联合禁止属性还false
for i in skill.element_set
if $data_system.elements != nil
if $data_system.elements =~ /連携禁止/
return false
end
end
end
# 基本目标没决定的情况
if @combo_bese_target == nil
@combo_all_target_count = 0
# 本来是攻击的情况
if skill.scope == 2
if @combo_all_target_count >= all_attck_skill_max
return false
end
# 全体(-1)设定基本目标
@combo_bese_target = -1
@combo_all_target_count += 1
# 是单体攻击的情况
else
@combo_bese_target = actor.current_action.target_index
end
# 如果基本目标决定最初的
# 攻击本来是攻击的情况
elsif @combo_bese_target == -1
if skill.scope == 2
# 1联合中规定回数以上的全体攻击不能编入
if @combo_all_target_count >= all_attck_skill_max
return false
end
@combo_all_target_count += 1
else
@combo_bese_target = actor.current_action.target_index
end
else
if skill.scope == 2
# 1联合中规定回数以上的全体攻击不能编入
if @combo_all_target_count >= all_attck_skill_max
return false
end
@combo_all_target_count += 1
else
# 目标是不是与基本目标一起
if actor.current_action.target_index != @combo_bese_target
return false
end
end
end
return true
end
| 欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |