Impact of ploidy and pathogen life cycle on resistance durability