{
"id": "at.turtleme.game.strike",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"index",
"at"
],
"properties": {
"at": {
"type": "integer",
"maximum": 100,
"minimum": 0,
"description": "Where the marker was across the bar, as a percentage of it."
},
"index": {
"type": "integer",
"minimum": 0,
"description": "Which placement of the run's windows was being watched. Placements only go forward, so a caller cannot go back for a window it liked the look of."
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"ref": "at.turtleme.game.defs#state",
"type": "ref"
},
"encoding": "application/json"
},
"description": "Strike at the marker. The caller says which of the run's windows it was watching and where across the bar the marker was; turtle meat works out the window from its own seed and decides what landed. This is the one method whose outcome depends on something only the browser can know, so where the marker was is taken on trust. What is not: the width of the window, where the sliver sits inside it, how many strikes a cast is good for, how fast strikes may follow one another, and the minute the water rests afterwards. Requires an atproto service auth token addressed to did:web:turtleme.at#turtle_game and naming this method, so a token issued for one call cannot be spent on another."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}