// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Medomai the Ageless deals combat damage to a player, take an extra turn after this one.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddExtraTurnControllerEffect(), false));
// Medomai the Ageless can't attack during extra turns.
Effect effect = new ConditionalRestrictionEffect(new CantAttackAllSourceEffect(Duration.WhileOnBattlefield), ExtraTurnCondition.getInstance());
effect.setText("{this} can't attack during extra turns");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}