Added 3 minutes later
By the way, I have a similar ability in my map. At the end of the week of ghosts/specters/shadows (spirits), equal-level units are given, provided that the hero's army contains at least one type of these creatures. If there are several types, one is given (mostly ghosts).