class RPG::UsableItem < RPG::BaseItem
def need_selection?
[1,6,7,9].include?(@scope)
end
def for_group1? #单个队友
@scope==7
end
end
class Game_Action
alias wdd_targets_for_opponents targets_for_opponents
def targets_for_opponents
if subject.is_a?(Game_Actor) #行动方是我方
if item.note.include?("单体回血") and item.for_group1?
return friends_unit.group_target104(@target_index)
end
else #行动方是敌方
if item.note.include?("单体回血") and item.for_group1?
return friends_unit.group_target104(@target_index)
end
end
wdd_targets_for_opponents
end
end
class Game_Unit
def group_target104(index) #我方单体回血
group104 = friends_unit.alive_members
group104 = [group104[0].hp_rate,group104[1].hp_rate,group104[2].hp_rate,group104[3].hp_rate,group104[4].hp_rate,group104[5].hp_rate].min
end
end
class RPG::UsableItem < RPG::BaseItem
def need_selection?
[1,6,7,9].include?(@scope)
end
def for_group1? #单个队友
@scope==7
end
end
class Game_Action
alias wdd_targets_for_opponents targets_for_opponents
def targets_for_opponents
if subject.is_a?(Game_Actor) #行动方是我方
if item.note.include?("单体回血") and item.for_group1?
return friends_unit.group_target104(@target_index)
end
else #行动方是敌方
if item.note.include?("单体回血") and item.for_group1?
return friends_unit.group_target104(@target_index)
end
end
wdd_targets_for_opponents
end
end
class Game_Unit
def group_target104(index) #我方单体回血
group104 = friends_unit.alive_members
group104 = [group104[0].hp_rate,group104[1].hp_rate,group104[2].hp_rate,group104[3].hp_rate,group104[4].hp_rate,group104[5].hp_rate].min
end
end