public void init(Ability source, Game game) {
super.init(source, game);
Target target = source.getTargets().get(0);
MageObject sourceObject = game.getObject(source.getSourceId());
if (target instanceof TargetCreatureOrPlayerAmount && sourceObject != null) {
TargetCreatureOrPlayerAmount multiTarget = (TargetCreatureOrPlayerAmount) target;
for (UUID targetId: multiTarget.getTargets()) {
Player player = null;
Permanent permanent = game.getPermanent(targetId);
if (permanent == null) {
player = game.getPlayer(targetId);
}
targetAmountMap.put(targetId, multiTarget.getTargetAmount(targetId));
StringBuilder sb = new StringBuilder(sourceObject.getName()).append(": Prevent the next ");
sb.append(multiTarget.getTargetAmount(targetId)).append(" damage to ");
if (player != null) {
sb.append(player.getName());
} else if (permanent != null) {
sb.append(permanent.getName());
}