// When Aegis Angel enters the battlefield, another target permanent is indestructible for as long as you control Aegis Angel.
ConditionalContinousEffect effect = new ConditionalContinousEffect(
new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.Custom),
new SourceOnBattlefieldControlUnchangedCondition(),
"another target permanent is indestructible for as long as you control Aegis Angel");
Ability ability = new EntersBattlefieldTriggeredAbility(effect, false);
Target target = new TargetPermanent(filter);
ability.addTarget(target);
this.addAbility(ability);