// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Kinscaer Harpoonist attacks, you may have target creature lose flying until end of turn.
Effect effect = new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
effect.setText("you may have target creature lose flying until end of turn");
Ability ability = new AttacksTriggeredAbility(effect, true);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}