Eidolon (5e Spell)
From D&D Wiki
|Casting time:||1 action|
|Components:||V, S, A (1 lb unbaked clay, 100 gp of diamond dust per hit die expended (see below), consumed in spellcasting)|
This spell, once cast, creates an identical duplicate of a target creature. In order to do so, you must "lock" hit die equal to either half the hit die of the target if they have class levels, or 2/3rds it's challenge rating otherwise. These locked hit die cannot be used to regain health during a short rest, do not get returned during a long rest, and cannot be used for further spells that lock hit die. You must lock at least one hit die.
This spell cannot be used to target creatures without self-awareness or intelligence, or creatures who would force you to lock hit die greater than your current amount available. If you duplicate a willing creature, it knows all information that the original creature knew, plus all information you know. If you duplicate an unwilling creature, it can make a Wisdom save at advantage; on a success the duplicate only knows information you know.
Once you've cast the spell, the duplicate obeys your orders, and will be considered to be Charmed by you, even if the original creature is immune to Charmed effects. Dismissing the duplicate is a one minute ritual that will refund you your locked hit die. However, if the duplicate is destroyed, you are not immediately refunded your locked hit die, and they return at a rate of one hit die per week.
If you duplicate a creature that can cast spells, it only has up to one spell slot per spell slot level, up to 7th only, but you can give it spell slots you have so it may cast spells.
You can use a Wish spell to negate the hit die cost of this spell, but doing so grants the duplicate it's own soul, making it a self-aware entity distinct from you or the original creature.