Well, individual pieces that can do something only N times is currently already possible: you define different piece types for each number of attempts they have left, and let those demote to the type that has one fewer attempt. The demotion can be specified by the morph parameter, and their permanent move can be exempted from it by marking it with an apostrophe in the XBetza description. Duplicating the piece type that way is not very elegant, though.
What is a problem is a 'global' budget, shared by all pieces (of the same, or a number of types). Then, if one piece uses the move, all other pieces that are capable of using it would have to be demoted. But implementing it that way would be quite inefficient.
I suppose a generic feature that is efficient could be this: a counter for each player is added to the game state, which by default starts at 0, but can be made to start at another value by a parameter counter=N. Moves in the XBetza description could be marked (e.g. with a t modifier); such a move would then only be allowed if the counter for that player is non-zero, and when such a move is performed it decrements the counter.
Well, individual pieces that can do something only N times is currently already possible: you define different piece types for each number of attempts they have left, and let those demote to the type that has one fewer attempt. The demotion can be specified by the morph parameter, and their permanent move can be exempted from it by marking it with an apostrophe in the XBetza description. Duplicating the piece type that way is not very elegant, though.
What is a problem is a 'global' budget, shared by all pieces (of the same, or a number of types). Then, if one piece uses the move, all other pieces that are capable of using it would have to be demoted. But implementing it that way would be quite inefficient.
I suppose a generic feature that is efficient could be this: a counter for each player is added to the game state, which by default starts at 0, but can be made to start at another value by a parameter counter=N. Moves in the XBetza description could be marked (e.g. with a t modifier); such a move would then only be allowed if the counter for that player is non-zero, and when such a move is performed it decrements the counter.