b=($game_party.actors[
0].hp).to_f/($game_party.actors[0].maxhp).to_f
a=[];for i in 11..14
name = $game_map.events[i].name
data=name.split(/,/)
if data[1].to_i <= 0;a[i]=2
else;a[i]=data[1].to_f/data[2].to_f;end
end;for i in 1..10
next if $game_self_switches[[
$game_map.map_id,i,"D"]]==true or
$game_map.events[i].character_name == ""
if a.min==1 or a.min>b;$friend14_target=0
elsif a.min == a[i];$friend14_target = i
end;end
b=($game_party.actors[
0].hp).to_f/($game_party.actors[0].maxhp).to_f
a=[];for i in 11..14
name = $game_map.events[i].name
data=name.split(/,/)
if data[1].to_i <= 0;a[i]=2
else;a[i]=data[1].to_f/data[2].to_f;end
end;for i in 1..10
next if $game_self_switches[[
$game_map.map_id,i,"D"]]==true or
$game_map.events[i].character_name == ""
if a.min==1 or a.min>b;$friend14_target=0
elsif a.min == a[i];$friend14_target = i
end;end