// Briber's Purse enters the battlefield with X gem counters on it.
this.addAbility(new EntersBattlefieldAbility(new BribersPurseEffect(), "{this} enters the battlefield with X gem counters on it"));
// {1}, {T}, Remove a gem counter from Briber's Purse: Target creature can't attack or block this turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantAttackBlockTargetEffect(Duration.EndOfTurn), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
ability.addCost(new RemoveCountersSourceCost(new Counter("gem")));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}