bishop
bishop copied to clipboard
Deferred effects
Effects that don't happen immediately, but rather contain a condition that's checked after each move and can return wait, cancel, or trigger. So an effect that is meant to happen in 3 turns can contain a condition that compares state.halfMoves to the half moves at the time the effect was created +6, and trigger when it is, or wait otherwise. It's also possible to make a variation of this where the effect can be cancelled (I can think of some interesting ideas like a timed mine that explodes after x turns unless destroyed).
This is also needed for Janggi's bikjang rule - flying generals except it happens after the other player's turn if they don't move out of the way (side note: it seems like there are many variations of this rule where it forces a draw or a win or it's optional and so on, so the implementation needs to be flexible).
Planning to do this after dart 3.0 comes out with records because it will be nicer to implement what I have in mind (also allowing incrementing/decrementing/setting the value instead of just waiting/decrementing)
https://en.wikipedia.org/wiki/Congo_(chess_variant)#Drowning - interesting use case (the monkey in this variant depends on multimoves)