diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-06-23 01:31:12 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-06-23 01:31:12 +0200 |
commit | 10f38ec5aac278113f1c91e5dd0a405931828f59 (patch) | |
tree | 4b2ae4f65e7eb9d1a73631750df16716ccda198b | |
parent | 189491d205c840fde568f3806b1358e15411459d (diff) | |
download | red-flag-over-paris-10f38ec5aac278113f1c91e5dd0a405931828f59.tar.gz |
fix edge case with georges vaysset when commune has no cards in hand
-rw-r--r-- | events.txt | 10 | ||||
-rw-r--r-- | rules.js | 6 |
2 files changed, 12 insertions, 4 deletions
@@ -421,10 +421,14 @@ CARD 60 - Sapper Tactics remove_disc (where_present(ANY)) CARD 61 - Georges Vaysset - asm clear_undo() asm log("Commune hand:") - asm { for (let c of game.red_hand) logi("C" + c) } - goto "georges_vaysset" + if (game.red_hand.length > 0) + asm clear_undo() + asm { for (let c of game.red_hand) logi("C" + c) } + goto "georges_vaysset" + else + asm { logi("Empty") } + endif CARD 62 - Colonne Vendôme # must have initiative @@ -4519,10 +4519,14 @@ CODE[60] = [ // Sapper Tactics ] CODE[61] = [ // Georges Vaysset - [ vm_asm, ()=>clear_undo() ], [ vm_asm, ()=>log("Commune hand:") ], + [ vm_if, ()=>(game.red_hand.length > 0) ], + [ vm_asm, ()=>clear_undo() ], [ vm_asm, ()=>{ for (let c of game.red_hand) logi("C" + c) } ], [ vm_goto, "georges_vaysset" ], + [ vm_else ], + [ vm_asm, ()=>{ logi("Empty") } ], + [ vm_endif ], [ vm_return ], ] |