}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event instanceof DamagedEvent) {
DamagedEvent damageEvent = (DamagedEvent) event;
if (damageEvent.isCombatDamage()) {
Permanent permanent = game.getPermanent(event.getSourceId());
if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)
&& permanent.getControllerId().equals(this.getControllerId())) {
this.getEffects().clear();
this.getEffects().add(new GainLifeEffect(damageEvent.getAmount()));
return true;
}
}
}
return false;