-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnochianChess.zrf
584 lines (560 loc) · 13.6 KB
/
EnochianChess.zrf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
(game
; Opening fluff
(title "Enochian Chess")
(description "A four-player chess variant in which players, in teams diagonally opposite one another, attempt to capture both kings of their opponents.")
(history "Enochian chess' fascinating history begins in the late 1800s, when occultists Wynn Westcott and MacGregor Mathers updated the Enochian system of magic for the Hermetic Order of the Golden Dawn, and incorporated a four-handed chess game originally dubbed Rosicrucian chess---later dubbed Enochian chess, due to its derivation from the Enochian Tablets of Dr. John Dee.\\From 'Enochian Chess of the Golden Dawn' by Chris Zalewski")
(players Air Earth Fire Water)
(option "prevent flipping" true)
; Movement macros
(define move-kp ($1 (verify not-friend?) add))
(define move-knq ($1 $2 (verify not-friend?) add))
(define move-br ($1 (while empty? add $1) (verify not-friend?) add))
; Turn order macros
(define air-deo (Air Water Fire Earth))
(define air-wid (Air Earth Fire Water))
(define earth-deo (Earth Air Water Fire))
(define earth-wid (Earth Fire Water Air))
(define fire-deo (Fire Earth Air Water))
(define fire-wid (Fire Water Air Earth))
(define water-deo (Water Fire Earth Air))
(define water-wid (Water Air Earth Fire))
(define Board-Definitions
(image "images\EnochianChess\Simple.bmp")
(grid
(start-rectangle 5 5 53 53)
(dimensions
("a/b/c/d/e/f/g/h" (49 0)) ; files
("8/7/6/5/4/3/2/1" (0 49)) ; columns
)
)
(zone
(name promotion-zone)
(players Air)
(positions a1 b1 c1 d1 e1 f1 g1 h1)
)
(zone
(name promotion-zone)
(players Earth)
(positions h1 h2 h3 h4 h5 h6 h7 h8)
)
(zone
(name promotion-zone)
(players Fire)
(positions a8 b8 c8 d8 e8 f8 g8 h8)
)
(zone
(name promotion-zone)
(players Water)
(positions a1 a2 a3 a4 a5 a6 a7 a8)
)
) ; Closing bracket for board definition
(define promotion
(if (in-zone? promotion-zone) ; these are wrong - need to fix
(if (is captured? Air bishop-pawn) (add $1))
(if (is captured? Air knight-pawn) (add $1))
(if (is captured? Air rook-pawn) (add $1))
(if (is captured? Air queen-pawn) (add $1))
(if (is captured? Earth bishop-pawn) (add $1))
(if (is captured? Earth knight-pawn) (add $1))
(if (is captured? Earth rook-pawn) (add $1))
(if (is captured? Earth queen-pawn) (add $1))
(if (is captured? Fire bishop-pawn) (add $1))
(if (is captured? Fire knight-pawn) (add $1))
(if (is captured? Fire rook-pawn) (add $1))
(if (is captured? Fire queen-pawn) (add $1))
(if (is captured? Water bishop-pawn) (add $1))
(if (is captured? Water knight-pawn) (add $1))
(if (is captured? Water rook-pawn) (add $1))
(if (is captured? Water queen-pawn) (add $1))
)
) ; Closing bracket for promotion
(piece
(name Bishop)
(help "Bishop: moves any number of squares in a diagonal direction.")
(image Air "images\Enochian\ABishop.bmp"
Earth "images\Enochian\EBishop.bmp"
Fire "images\Enochian\FBishop.bmp"
Water "images\Enochian\WBishop.bmp")
(moves
(move-br nw)
(move-br ne)
(move-br sw)
(move-br se)
)
) ; closing bracket for bishop
(piece
(name King)
(help "King: moves one square in any direction.")
(image Air "images\Enochian\AKing.bmp"
Earth "images\Enochian\EKing.bmp"
Fire "images\Enochian\FKing.bmp"
Water "images\Enochian\WKing.bmp")
(moves
(move-kp n)
(move-kp s)
(move-kp e)
(move-kp w)
(move-kp ne)
(move-kp nw)
(move-kp se)
(move-kp sw)
)
) ; closing bracket for king
(piece
(name Knight)
(help "Knight: moves two squares in one direction, then one in a parallel direction, leaping over any pieces in its path.")
(image Air "images\Enochian\AKnight.bmp"
Earth "images\Enochian\EKnight.bmp"
Fire "images\Enochian\FKnight.bmp"
Water "images\Enochian\WKnight.bmp")
(moves
(move-knq n ne)
(move-knq n nw)
(move-knq s se)
(move-knq s sw)
(move-knq e ne)
(move-knq e se)
(move-knq w nw)
(move-knq w sw)
)
) ; closing bracket for knight
(piece
(name Queen)
(help "Queen: moves two squares in any direction, leaping over any pieces in its path.")
(image Air "images\Enochian\AQueen.bmp"
Earth "images\Enochian\EQueen.bmp"
Fire "images\Enochian\FQueen.bmp"
Water "images\Enochian\WQueen.bmp")
(moves
(move-knq n n)
(move-knq s s)
(move-knq e e)
(move-knq w w)
(move-knq nw nw)
(move-knq ne ne)
(move-knq sw sw)
(move-knq se se)
)
) ; closing bracket for queen
(piece
(name Rook)
(help "Rook: moves any number of squares in an orthogonal direction.")
(image Air "images\Enochian\ARook.bmp"
Earth "images\Enochian\ERook.bmp"
Fire "images\Enochian\FRook.bmp"
Water "images\Enochian\WRook.bmp")
(moves
(move-br n)
(move-br s)
(move-br e)
(move-br w)
)
) ; closing bracket for rook
(define bishop-pawn
(piece
(name $1-Bishop-Pawn)
(help "Bishop pawn: moves one square forward, promotes to bishop when reaching the last rank, if at least one of the player's pawns has been taken.")
(image Air "images\Enochian\APawnBishop.bmp"
Earth "images\Enochian\EPawnBishop.bmp"
Fire "images\Enochian\FPawnBishop.bmp"
Water "images\Enochian\WPawnBishop.bmp")
(moves (move-kp $2))
(promotion Bishop)
)
) ; closing bracket for bishop pawn
(define knight-pawn
(piece
(name $1-Knight-Pawn)
(help "Knight pawn: moves one square forward, promotes to knight when reaching the last rank, if at least one of the player's pawns has been taken.")
(image Air "images\Enochian\APawnKnight.bmp"
Earth "images\Enochian\EPawnKnight.bmp"
Fire "images\Enochian\FPawnKnight.bmp"
Water "images\Enochian\WPawnKnight.bmp")
(moves (move-kp $2))
(promotion Knight)
)
) ; closing bracket for knight pawn
(define rook-pawn
(piece
(name $1-Rook-Pawn)
(help "Rook pawn: moves one square forward, promotes to rook when reaching the last rank, if at least one of the player's pawns has been taken.")
(image Air "images\Enochian\APawnRook.bmp"
Earth "images\Enochian\EPawnRook.bmp"
Fire "images\Enochian\FPawnRook.bmp"
Water "images\Enochian\WPawnRook.bmp")
(moves (move-kp $2))
(promotion Rook)
)
) ; closing bracket for rook pawn
(define queen-pawn
(piece
(name $1-Queen-Pawn)
(help "Queen pawn: moves one square forward, promotes to queen when reaching the last rank, if at least one of the player's pawns has been taken.")
(image Air "images\Enochian\APawnQueen.bmp"
Earth "images\Enochian\EPawnQueen.bmp"
Fire "images\Enochian\FPawnQueen.bmp"
Water "images\Enochian\WPawnQueen.bmp")
(moves (move-kp $2))
(promotion Queen)
)
) ; closing bracket for queen pawn
; Pawn movement rules
(bishop-pawn Air s)
(knight-pawn Air s)
(queen-pawn Air s)
(rook-pawn Air s)
(bishop-pawn Earth e)
(knight-pawn Earth e)
(queen-pawn Earth e)
(rook-pawn Earth e)
(bishop-pawn Fire n)
(knight-pawn Fire n)
(queen-pawn Fire n)
(rook-pawn Fire n)
(bishop-pawn Water w)
(knight-pawn Water w)
(queen-pawn Water w)
(rook-pawn Water w)
(variant
(title "Air of Earth (Deosil)")
(define Board-Definitions
(image "images\EnochianChess\Earth.bmp")
) ; Closing bracket for board definition
(turn-order (air-deo))
(board-setup
(Air
(Air Bishop Pawn a7)
(Air Knight Pawn c7)
(Air Rook Pawn b7)
(Air Queen Pawn d7)
(Bishop a8)
(Knight c8)
(Rook b8)
(Queen d8)
; (King a8)
)
(Earth
(Earth Bishop Pawn b1)
(Earth Knight Pawn b3)
(Earth Rook Pawn b2)
(Earth Queen Pawn b4)
(Bishop a1)
(Knight a3)
(Rook a2)
(Queen a4)
; (King a1)
)
(Fire
(Fire Bishop Pawn h2)
(Fire Knight Pawn f2)
(Fire Rook Pawn g2)
(Fire Queen Pawn e2)
(Bishop h1)
(Knight f1)
(Rook g1)
(Queen e1)
; (King h1)
)
(Water
(Water Bishop Pawn g8)
(Water Knight Pawn g6)
(Water Rook Pawn g7)
(Water Queen Pawn g5)
(Bishop h8)
(Knight h6)
(Rook h7)
(Queen h5)
; (King h8)
)
) ; close of board-setup
(variant
(title "Air of Earth (Widdershins)")
(turn order (air-wid))
) ; close of widdershins
) ; closing bracket for Air of Earth
(variant
(title "Air of Fire (Deosil)")
(define Board-Definitions
(image "images\EnochianChess\Fire.bmp")
) ; Closing bracket for board definition
(turn-order (air-deo))
(board-setup
(Air
(Air Bishop Pawn a7)
(Air Knight Pawn c7)
(Air Rook Pawn b7)
(Air Queen Pawn d7)
(Bishop a8)
(Knight c8)
(Rook b8)
(Queen d8)
; (King a8)
)
(Earth
(Earth Bishop Pawn b1)
(Earth Knight Pawn b3)
(Earth Rook Pawn b2)
(Earth Queen Pawn b4)
(Bishop a1)
(Knight a3)
(Rook a2)
(Queen a4)
; (King a1)
)
(Fire
(Fire Bishop Pawn h2)
(Fire Knight Pawn f2)
(Fire Rook Pawn g2)
(Fire Queen Pawn e2)
(Bishop h1)
(Knight f1)
(Rook g1)
(Queen e1)
; (King h1)
)
(Water
(Water Bishop Pawn g8)
(Water Knight Pawn g6)
(Water Rook Pawn g7)
(Water Queen Pawn g5)
(Bishop h8)
(Knight h6)
(Rook h7)
(Queen h5)
; (King h8)
)
) ; close of board-setup
(variant
(title "Air of Fire (Widdershins)")
(turn-order (air-wid))
) ; close of widdershins
) ; closing bracket for variant
(variant
(title "Earth of Earth (Deosil)")
(define Board-Definitions
(image "images\EnochianChess\Earth.bmp")
) ; Closing bracket for board definition
(turn-order (earth-deo))
(board-setup
(Air
(Air Bishop Pawn b7)
(Air Knight Pawn d7)
(Air Rook Pawn a7)
(Air Queen Pawn c7)
(Bishop b8)
(Knight d8)
(Rook a8)
(Queen c8)
; (King h1)
)
(Earth
(Earth Bishop Pawn b2)
(Earth Knight Pawn b4)
(Earth Rook Pawn b1)
(Earth Queen Pawn b3)
(Bishop a2)
(Knight a4)
(Rook a1)
(Queen a3)
; (King a1)
)
(Fire
(Fire Bishop Pawn g2)
(Fire Knight Pawn e2)
(Fire Rook Pawn h2)
(Fire Queen Pawn f2)
(Bishop g1)
(Knight e1)
(Rook h1)
(Queen f1)
; (King h1)
)
(Water
(Water Bishop Pawn g7)
(Water Knight Pawn g5)
(Water Rook Pawn g8)
(Water Queen Pawn g6)
(Bishop h7)
(Knight h5)
(Rook h8)
(Queen h6)
; (King h8)
)
) ; close of board-setup
(variant
(title "Earth of Earth (Widdershins)")
(turn order (earth-wid))
) ; close of widdershins
) ; close of variant
(variant
(title "Earth of Fire (Deosil)")
(define Board-Definitions
(image "images\EnochianChess\Fire.bmp")
) ; Closing bracket for board definition
(turn-order (earth-deo))
(board-setup
(Air
(Air Bishop Pawn b7)
(Air Knight Pawn d7)
(Air Rook Pawn a7)
(Air Queen Pawn c7)
(Bishop b8)
(Knight d8)
(Rook a8)
(Queen c8)
; (King h1)
)
(Earth
(Earth Bishop Pawn b2)
(Earth Knight Pawn b4)
(Earth Rook Pawn b1)
(Earth Queen Pawn b3)
(Bishop a2)
(Knight a4)
(Rook a1)
(Queen a3)
; (King a1)
)
(Fire
(Fire Bishop Pawn g2)
(Fire Knight Pawn e2)
(Fire Rook Pawn h2)
(Fire Queen Pawn f2)
(Bishop g1)
(Knight e1)
(Rook h1)
(Queen f1)
; (King h1)
)
(Water
(Water Bishop Pawn g7)
(Water Knight Pawn g5)
(Water Rook Pawn g8)
(Water Queen Pawn g6)
(Bishop h7)
(Knight h5)
(Rook h8)
(Queen h6)
; (King h8)
)
) ; close of board-setup
(variant
(title "Earth of Fire (Widdershins)")
(turn order (earth-wid))
) ; close of widdershins
) ; close of variant
(variant
(title "Water of Earth (Deosil)")
(define Board-Definitions
(image "images\EnochianChess\Earth.bmp")
) ; Closing bracket for board definition
(turn-order (water-deo))
(board-setup
(Air
(Air Bishop Pawn d7)
(Air Knight Pawn b7)
(Air Rook Pawn c7)
(Air Queen Pawn a7)
(Knight b8)
(Bishop d8)
(Rook c8)
(Queen a8)
; (King a8)
)
(Earth
(Earth Bishop Pawn b4)
(Earth Knight Pawn b2)
(Earth Rook Pawn b3)
(Earth Queen Pawn b1)
(Bishop a4)
(Knight a2)
(Rook a3)
(Queen a1)
; (King a1)
)
(Fire
(Fire Bishop Pawn e2)
(Fire Knight Pawn g2)
(Fire Rook Pawn f2)
(Fire QUeen Pawn h2)
(Bishop e1)
(Knight g1)
(Rook f1)
(Queen h1)
; (King h8)
)
(Water
(Water Bishop Pawn g5)
(Water Knight Pawn g7)
(Water Rook Pawn g6)
(Water Queen Pawn g8)
(Bishop h5)
(Knight h7)
(Rook h6)
(Queen h8)
; (King h8)
)
) ; close of board-setup
(variant
(title "Water of Earth (Widdershins)")
(turn order (water-wid))
) ; close of widdershins
) ; closing bracket for variant
(variant
(title "Water of Fire (Deosil)")
(define Board-Definitions
(image "images\EnochianChess\Fire.bmp")
) ; Closing bracket for board definition
(turn-order (water-deo))
(board-setup
(Air
(Air Bishop Pawn d7)
(Air Knight Pawn b7)
(Air Rook Pawn c7)
(Air Queen Pawn a7)
(Knight b8)
(Bishop d8)
(Rook c8)
(Queen a8)
; (King a8)
)
(Earth
(Earth Bishop Pawn b4)
(Earth Knight Pawn b2)
(Earth Rook Pawn b3)
(Earth Queen Pawn b1)
(Bishop a4)
(Knight a2)
(Rook a3)
(Queen a1)
; (King a1)
)
(Fire
(Fire Bishop Pawn e2)
(Fire Knight Pawn g2)
(Fire Rook Pawn f2)
(Fire QUeen Pawn h2)
(Bishop e1)
(Knight g1)
(Rook f1)
(Queen h1)
; (King h8)
)
(Water
(Water Bishop Pawn g5)
(Water Knight Pawn g7)
(Water Rook Pawn g6)
(Water Queen Pawn g8)
(Bishop h5)
(Knight h7)
(Rook h6)
(Queen h8)
; (King h8)
)
) ; close of board-setup
(variant
(title "Water of Fire (Widdershins)")
(turn order (water-wid))
) ; close of widdershins
) ; closing bracket for variant
)