Your condition is "target_range < 0" which actually impossible to get range below 0 @.@
Also, I'm not sure if I understand your question. Can you elaborate? with pics may be better
[:script, "@target_array.delete_if {|t| !t.front_row?}"]
[:if, "!@target_array.empty?", ... ],
[:script, "
if @target_array.any? {|t| t.front_row?}
@target_array.delete_if {|t| !t.front_row?}
elsif @target_array.any? {|t| t.middle_row?}
@target_array.delete_if {|t| !t.middle_row?}
end
"],
Original thread: https://forums.rpgmakerweb.com/threads/theolized-sideview-battle-system.29231/