I'm wondering how divine smite can be implemented in to Baldur's Gate 3, since paladin is my favorite class and I'm definitely gonna play one when games is released.

Divine Smite
Starting at 2nd level, when you hit a creature with a melee weapon attack, you can expend one spell slot to deal radiant damage to the target, in addition to the weapon's damage. The extra damage is 2d8 for a 1st-level spell slot, plus 1d8 for each spell level higher than 1st, to a maximum of 5d8. The damage increases by 1d8 if the target is an undead or a fiend, to a maximum of 6d8.

What makes divine smite so good is that you can choose to use it after you're attack roll, preventing wasting spell slot or even saving it for crit's. But I'm not sure how could this be implemented in a video game. Any ideas?