The wind-up and strike drawings are 1088×1088, on transparency, facing right.
animation: null has no drawings yet: animate its art instead (a lean and a lunge read well).
Drawing a frame
The drawings share the art’s space, measured from 0 to 1 across and down.- Find the pivot:
animation.pivotis where the character meets the ground. - Draw the frame scaled by
artScalerelative to the art, with its pivot on the art’s pivot. - To face left, mirror the frame horizontally about the pivot.
Timing
An attack is one of three kinds:- strike: the card attacks one neighbour and captures it;
- stomp: it attacks several neighbours at once and captures at least one;
- blocked: it captures nothing. It never reaches the strike drawing; being stopped short is the point.
kit.animation.timing says which drawing shows over the attack’s progress, from 0 to 1:
The game cuts between drawings on the fast part of the motion and holds each extreme. Move the card with the attack, then swap the drawing at these marks.
Seat sync tells you what happened, in order:
cardPlaced, then cardsCaptured with the cells that flipped (no cardsCaptured after an attack means it was blocked), and cardHopped when a card hops off a chess tile and attacks again. Which neighbours a card attacks follows from the board: every enemy card next to it, not frozen. See Reading sides.