simplify groovy script, remove redundant check for existence of ability and use more convenient addAbility method