//------------------------------------------------------------------------------ // Generic // Sites that contain enemy units that are facing away from the unit at site #1 (define "SitesWithEnemyFacingAway" (forEach (sites Occupied by:Enemy container:"Board" components:{"TinSoldier" "RiderOutline" "Bishop"}) if:(not (= (% (+ (rotation at:(site)) 4) 8) (rotation at:(#1)))) ) ) // Sites that a piece can stand on (define "SitesCanStandOn" (difference (sites Empty) (difference (sites "WaterRegion") "RegionBridge")) ) // Sites that are currently being attacked by #1 (can't build entrenchment on) (define "AttackedSites" (union { (sites Around (sites Occupied by:#1 container:"Board") includeSelf:True) (sites Around (sites Direction from:(sites Occupied by:#1 container:"Board" components:{"TinSoldier" "Bishop"}) Forward distance:1) Orthogonal includeSelf:True) (sites Around (sites Direction from:(sites Occupied by:#1 container:"Board" components:{"RegimentalOutline"}) Forward distance:1) Orthogonal includeSelf:True) (sites Around (sites Direction from:(sites Occupied by:#1 container:"Board" components:{"CannonOutline"}) Forward distance:1) Orthogonal includeSelf:True) (sites Around (sites Direction from:(sites Occupied by:#1 container:"Board" components:{"CannonOutline"}) Forward distance:2) Orthogonal includeSelf:True) }) ) (define "UnoccupiedUnits" (union { (forEach (sites Occupied by:All container:"Board" components:{"Triangle"}) if:(= (value Piece at:(site)) 0) ) (forEach (sites Occupied by:P1 container:"Board" components:{"CannonOutline" "RegimentalOutline" "WagonOutline"}) if:(= 0 (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:P1 container:"Board" components:{"TinSoldier" "Bishop"})))) ) (forEach (sites Occupied by:P2 container:"Board" components:{"CannonOutline" "RegimentalOutline" "WagonOutline"}) if:(= 0 (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:P2 container:"Board" components:{"TinSoldier" "Bishop"})))) ) }) ) (define "PanningMove" (if (= (state at:(from)) 1) (move Set Rotation {0 2 4 6} previous:False next:False) ) ) //------------------------------------------------------------------------------ // Entrenchments // Sets the owner of each entrenchment, checked at the end of each turn phase. (define "SetOccupiedEntrenchments" (and (forEach Site (sites Occupied by:All container:"Board" components:{"Triangle"}) (if (and (not (is In (site) ("AttackedSites" Mover))) (= (value Piece at:(site)) (id Mover)) ) (set Value at:(site) 0) ) ) (forEach Site (sites Occupied by:All container:"Board" components:{"Triangle"}) (if (and (is In (site) ("AttackedSites" Mover)) (= (value Piece at:(site)) 0) ) (set Value at:(site) (id Mover)) ) ) ) ) // Entrenchment sites that protect against attacks against site #1 from site #2 (define "EntrenchmentProtectingSites" (forEach (sites Occupied by:All container:"Board" components:{"Triangle"}) if:(and (= (% (+ (rotation at:(site)) 4) 8) (rotation at:(#2))) (= (value Piece at:(site)) (who at:(#1))) ) ) ) // Checks if site #1 is protected by an entrenchment against attacks from site #2 (define "IsSiteProtectedByEntrenchment" (= 1 (count Sites in:(intersection (sites Direction from:(#1) (directions Cell from:(ahead (#2)) to:(#2)) distance:1) ("EntrenchmentProtectingSites" #1 #2)))) ) // Move that builds an entrenchment at the rotation specified in #1 (define "BuildEntrenchmentMove" (move Select (from (from) if:(= (state at:(from)) 1)) (to (difference (intersection (sites Around (from)) "SitesCanStandOn") ("AttackedSites" Enemy)) ) (then (and { (add (piece "Triangle0") (to (last To)) ) (set Rotation (to (last To)) {#1} previous:False next:False) (set Value at:(last To) (id Mover)) }) ) ) ) (define "DemolishEntrenchmentMove" (move Select (from (from) if:(= (state at:(from)) 1)) (to (intersection (sites Occupied by:All container:"Board" components:{"Triangle"}) (sites Around (from)) ) if:(and (= (value Piece at:(to)) (id Mover)) (not (is In (to) ("AttackedSites" Enemy))) ) ) (then (remove (last To))) ) ) //------------------------------------------------------------------------------ // Bridge Wagon (define "DemolishBridgeWagonMove" (move Select (from (from) if:(= (state at:(from)) 1)) (to (intersection { (sites Occupied by:All container:"Board" components:{"WagonOutline"}) (sites Around (from)) "UnoccupiedUnits" }) ) (then (remove (last To))) ) ) (define "DemolishBridgeMove" (move Select (from (from) if:(= (state at:(from)) 1)) (to (intersection "RegionBridge" (sites Around (from)) ) if:(not (is In (to) ("AttackedSites" Enemy))) ) (then (forget Value "Bridges" (last To))) ) ) //------------------------------------------------------------------------------ // Bridge (define "BuildBridge" (move Select (from (from) if:(and { (= (state at:(from)) 1) (< 0 (value Piece at:(from))) (< 0 (count Sites in:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Mover container:"Board" components:{"TinSoldier" "Bishop"})))) }) ) (to (forEach (union (sites Around (from)) (sites Around (sites Group from:(forEach (sites Around (from)) if:(is In (site) "RegionBridge") ) if:(is In (to) "RegionBridge") ) ) ) if:(and { (is In (site) (difference (sites "WaterRegion") "RegionBridge")) (not (is In (site) ("AttackedSites" Enemy))) }) ) ) (then (and { (remember Value "Bridges" (last To)) (set Value at:(last From) (- (value Piece at:(last From)) 1)) }) ) ) ) (define "DeconstructBridge" (move Select (from (from) if:(and { (= (state at:(from)) 1) (> 4 (value Piece at:(from))) (< 0 (count Sites in:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Mover container:"Board" components:{"TinSoldier" "Bishop"})))) }) ) (to (forEach (union (sites Around (from)) (sites Around (sites Group from:(forEach (sites Around (from)) if:(is In (site) "RegionBridge") ) if:(is In (to) "RegionBridge") ) ) ) if:(and { (is In (site) "RegionBridge") (is In (site) (union (sites Empty) ("UnoccupiedUnits"))) }) ) ) (then (and { (forget Value "Bridges" (last To)) (set Value at:(last From) (+ (value Piece at:(last From)) 1)) (remove (last To)) }) ) ) ) (define "BuildBridgeGround" (move Select (from (from) if:(and { (= (state at:(from)) 1) (< 0 (value Piece at:(from))) (< 0 (count Sites in:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Mover container:"Board" components:{"TinSoldier" "Bishop"})))) }) ) (to (intersection (sites Around (from)) (difference (sites Empty) (sites "WaterRegion"))) ) (then (and { (add (piece "Square0") (to (last To))) (set Value at:(last From) (- (value Piece at:(last From)) 1)) }) ) ) ) (define "DeconstructBridgeGround" (move Select (from (from) if:(and { (= (state at:(from)) 1) (> 4 (value Piece at:(from))) (< 0 (count Sites in:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Mover container:"Board" components:{"TinSoldier" "Bishop"})))) }) ) (to (intersection (sites Around (from)) (sites Occupied by:Neutral container:"Board" components:{"Square"})) ) (then (and { (set Value at:(last From) (+ (value Piece at:(last From)) 1)) (remove (last To)) }) ) ) ) (define "BurnBridgeMove" (move Select (from (from) if:(= (state at:(from)) 1)) (to (intersection "RegionBridge" (sites Around (from)) ) ) (then ("SetFireRegion" (last To) Mover)) ) ) //------------------------------------------------------------------------------ // Fire (define "CheckFireSites" (if (= (id #1) 1) (forEach Site "RegionFire1" (remove (site))) (forEach Site "RegionFire2" (remove (site))) ) ) // #1 = fire site, #2 = mover (define "SetFireRegion" (if (= (id #2) 1) (remember Value "Fires1" #1) (remember Value "Fires2" #1) ) ) //------------------------------------------------------------------------------ // Infantry // Moves that infantry can make. (define "InfantryMoves" // Move without any capture (move Slide (from (from) if:(= (state at:(from)) 3) ) (between (range 1 8) if:(or { (is In (between) "SitesCanStandOn") (is In (between) (sites "TownRegion")) }) ) (to if:False (apply if:(if (is Occupied (to)) (not (is In (to) (sites "TownRegion"))) True ) ) ) (then (and (set Var "FromArtillerySite" (last From)) (set Var "ToArtillerySite" (last To)) ) ) ) // Move with capture (move Step (from (from) if:(= (state at:(from)) 1)) (directions {Forward FR FL}) (to if:("IsEnemyAt" (to)) (apply (remove (to))) ) ) // Shoot (normal) (move Select (from (from) if:(= (state at:(from)) 1)) (to (intersection ("SitesWithEnemyFacingAway" from) (expand origin:(ahead (from)) Orthogonal) ) if:(or (not ("IsSiteProtectedByEntrenchment" (to) (from))) (is In (to) (sites Occupied by:Mover container:"Board" components:{"RiderOutline"})) ) ) (then (remove (last To))) ) // Shoot (from entrenchment) (move Select (from (from) if:(= (state at:(from)) 1)) (to (intersection (sites Occupied by:Enemy container:"Board" components:{"TinSoldier" "RiderOutline" "Bishop"}) (expand origin:(ahead (from)) Orthogonal) ) if:("IsSiteProtectedByEntrenchment" (from) (to)) ) (then (remove (last To))) ) // Shoot (outnumber the enemy) (move Select (from (from) if:(and (= (state at:(from)) 1) (is In (ahead (from)) (sites Occupied by:Mover container:"Board" components:{"TinSoldier" "Bishop"})) ) ) (to (intersection (expand origin:(ahead (from)) Orthogonal) (sites Occupied by:Enemy container:"Board" components:{"TinSoldier" "RiderOutline" "Bishop"}) ) if:(or (not ("IsSiteProtectedByEntrenchment" (to) (from))) (is In (to) (sites Occupied by:Mover container:"Board" components:{"RiderOutline"})) ) ) (then (remove (last To)) ) ) // Build entrenchments ("BuildEntrenchmentMove" 0) ("BuildEntrenchmentMove" 2) ("BuildEntrenchmentMove" 4) ("BuildEntrenchmentMove" 6) "PanningMove" "DemolishEntrenchmentMove" "DemolishArtilleryMove" "DemolishBridgeWagonMove" "DemolishBridgeMove" "BurnBridgeMove" ) //------------------------------------------------------------------------------ // Cavalry (define "CavalryMoves" // Move without any capture (move Slide (from (from) if:(= (state at:(from)) 3) ) (between (range 1 12) if:(or { (is In (between) "SitesCanStandOn") (is In (between) (sites "TownRegion")) }) ) (to if:False (apply if:(if (is Occupied (to)) (not (is In (to) (sites "TownRegion"))) True ) ) ) ) // Move with capture (against just infantry) (move Slide (from (from) if:(= (state at:(from)) 1) ) (between (range 1 12) if:(or { (is In (between) "SitesCanStandOn") (is In (between) (sites "TownRegion")) (is In (between) (sites Occupied by:Enemy container:"Board" components:{"TinSoldier" "Bishop"})) }) (apply (remove (between))) ) (to if:(and (< 0 (count Sites in:(intersection (sites Around (to) Orthogonal) (sites Occupied by:Enemy container:"Board")))) (is In (to) (sites Occupied by:Enemy container:"Board" components:{"TinSoldier" "Bishop"})) ) (apply if:(and (not (is In (to) (sites "TownRegion"))) (is In (to) (sites Occupied by:Enemy container:"Board"))) (remove (to)) ) ) ) // Move with capture (against cavalry and infantry) (move Slide (from (from) if:(= (state at:(from)) 1) ) (directions {Forward FR FL}) (between (range 1 12) if:(or { (is In (between) "SitesCanStandOn") (is In (between) (sites "TownRegion")) (is In (between) (sites Occupied by:Enemy container:"Board" components:{"TinSoldier" "RiderOutline" "Bishop"})) }) (apply if:(is In (between) (sites Occupied by:Enemy container:"Board" components:{"TinSoldier" "RiderOutline" "Bishop"})) (remove (between)) ) ) (to if:(and (< 0 (count Sites in:(intersection (sites Around (to) Orthogonal) (sites Occupied by:Enemy container:"Board")))) (is In (to) (sites Occupied by:Enemy container:"Board" components:{"TinSoldier" "RiderOutline" "Bishop"})) ) (apply if:(and (not (is In (to) (sites "TownRegion"))) (is In (to) (sites Occupied by:Enemy container:"Board"))) (remove (to)) ) ) ) "PanningMove" "DemolishEntrenchmentMove" "DemolishArtilleryMove" "DemolishBridgeWagonMove" "DemolishBridgeMove" "BurnBridgeMove" ) //------------------------------------------------------------------------------ // Artillery (define "ArtillerySlide" (move Slide (from (from) if:(and { (= (state at:(from)) 3) (is In (from) (sites Around (var "FromArtillerySite") Orthogonal)) }) ) Orthogonal (between (range 1 #1) if:(is In (between) "SitesCanStandOn") ) (to if:False (apply if:(is In (to) (sites Around (var "ToArtillerySite") Orthogonal)) ) ) (then (and (set Var "FromArtillerySite" -1) (set Var "ToArtillerySite" -1) ) ) ) ) // Can attack all pieces if behind an entrenchment (define "ArtilleryEntrenched" (move Select (from (from) if:(and { (= (state at:(from)) 1) (< 0 (count Sites in:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Mover container:"Board" components:{"TinSoldier" "Bishop"})))) }) ) (to (intersection (union (sites Occupied by:Enemy container:"Board" components:{"TinSoldier" "RiderOutline" "Bishop" "CannonOutline" "RegimentalOutline" "WagonOutline"}) (sites Occupied by:All container:"Board" components:{"Triangle"}) ) #1 ) if:(and (or (not ("IsSiteProtectedByEntrenchment" (to) (from))) (is In (to) (sites Occupied by:Mover container:"Board" components:{"RiderOutline"})) ) ("IsSiteProtectedByEntrenchment" (from) (to)) ) ) (then (remove (last To))) ) ) // Can attack all pieces (define "ArtilleryShootStrong" (move Select (from (from) if:(and { (= (state at:(from)) 1) (< 0 (count Sites in:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Mover container:"Board" components:{"TinSoldier" "Bishop"})))) }) ) (to (intersection (union (sites Occupied by:Enemy container:"Board" components:{"TinSoldier" "RiderOutline" "Bishop" "CannonOutline" "RegimentalOutline" "WagonOutline"}) (sites Occupied by:All container:"Board" components:{"Triangle"}) ) #1 ) if:(or (not ("IsSiteProtectedByEntrenchment" (to) (from))) (is In (to) (sites Occupied by:Mover container:"Board" components:{"RiderOutline"})) ) ) (then (remove (last To))) ) ) // Cannot attack the CannonOutline (define "ArtilleryShootWeak" (move Select (from (from) if:(and { (= (state at:(from)) 1) (< 0 (count Sites in:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Mover container:"Board" components:{"TinSoldier" "Bishop"})))) }) ) (to (intersection (union (sites Occupied by:Enemy container:"Board" components:{"TinSoldier" "RiderOutline" "Bishop" "RegimentalOutline" "WagonOutline"}) (sites Occupied by:All container:"Board" components:{"Triangle"}) ) #1 ) if:(or (not ("IsSiteProtectedByEntrenchment" (to) (from))) (is In (to) (sites Occupied by:Mover container:"Board" components:{"RiderOutline"})) ) ) (then (remove (last To))) ) ) (define "ArtilleryShootBridge" (move Select (from (from) if:(and { (= (state at:(from)) 1) (< 0 (count Sites in:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Mover container:"Board" components:{"TinSoldier" "Bishop"})))) }) ) (to (intersection "RegionBridge" #1 ) if:(not ("IsSiteProtectedByEntrenchment" (to) (from))) ) (then (forget Value "Bridges" (last To))) ) ) (define "ArtilleryBurnBridge" (move Select (from (from) if:(and { (= (state at:(from)) 1) (< 0 (count Sites in:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Mover container:"Board" components:{"TinSoldier" "Bishop"})))) }) ) (to (intersection "RegionBridge" #1 ) if:(not ("IsSiteProtectedByEntrenchment" (to) (from))) ) (then // (add (piece (id "Fire" Mover)) (to (last To))) ("SetFireRegion" (last To) Mover) ) ) ) (define "ArtilleryPanning" (if (and (= (state at:(from)) 1) (< 0 (count Sites in:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Mover container:"Board" components:{"TinSoldier" "Bishop"})))) ) (move Set Rotation {0 2 4 6} previous:False next:False) ) ) (define "DemolishArtilleryMove" (move Select (from (from) if:(= (state at:(from)) 1)) (to (intersection (sites Occupied by:All container:"Board" components:{"CannonOutline" "RegimentalOutline"}) (sites Around (from) Orthogonal) ) if:(> (state at:(to)) 0) ) (then (remove (last To))) ) ) //------------------------------------------------------------------------------ // Regions (define "RegionBridge" (sites (values Remembered "Bridges"))) (define "RegionFire1" (sites (values Remembered "Fires1"))) (define "RegionFire2" (sites (values Remembered "Fires2"))) (define "RegionFireTemp" (sites (values Remembered "FireTemp"))) (define "EndBridgePlacementCheck" (if ("HandEmpty" P2) (and { (set Hidden (sites Board) False to:All) (set Var "FromArtillerySite" -1) (set Var "ToArtillerySite" -1) (forEach Site (sites Occupied by:All container:"Board" components:{"Square"}) (and (remember Value "Bridges" (site)) (remove (site)) ) ) }) (pass) ) ) (define "FireSpreadMoves" (move Select (from #1) (to (from)) (then (and { (forEach Site (intersection (sites Around (last From)) "RegionBridge") (remember Value "FireTemp" (site)) ) //(forget Value #2 (last From)) //(forget Value "Bridges" (last From)) (moveAgain) }) ) ) (move Pass (then (and { (forEach Site #1 (and (forget Value #2 (site)) (forget Value "Bridges" (site)) ) ) (forEach Site (sites "FireTemp") (and (remember Value #2 (site)) (forget Value "FireTemp" (site)) ) ) (moveAgain) }) ) ) ) (define "PlacementMove" (move (from (sites Occupied by:Mover container:(mover) components:{"TinSoldier" "RiderOutline" "CannonOutline" "RegimentalOutline" "WagonOutline"})) (to (intersection (sites Mover "Home") (difference (sites Empty) (sites "WaterRegion")) ) ) (then (set Rotation (to (last To)) #1 previous:False next:False) ) ) ) //------------------------------------------------------------------------------ (game "Kriegsspiel" (players 2) (equipment { (board (rectangle 33 49)) (hand Each size:6) (piece "Mountain" Neutral) (piece "Town" Neutral) (piece "Forest" Neutral) (piece "Triangle" Neutral) (piece "Square" Neutral) (regions "HomeP1" P1 (expand (sites Left) steps:15)) (regions "HomeP2" P2 (expand (sites Right) steps:15)) (piece "CannonOutline" Each (or { ("ArtillerySlide" 6) ("ArtilleryShootStrong" (union (expand origin:(ahead (from)) Orthogonal) (expand origin:(ahead (from) steps:2) Orthogonal))) ("ArtilleryShootBridge" (union (expand origin:(ahead (from)) Orthogonal) (expand origin:(ahead (from) steps:2) Orthogonal))) "ArtilleryPanning" }) maxState:100 maxValue:10000 ) (piece "RegimentalOutline" Each (or { ("ArtillerySlide" 8) ("ArtilleryShootWeak" (expand origin:(ahead (from)) Orthogonal)) ("ArtilleryEntrenched" (expand origin:(ahead (from)) Orthogonal)) ("ArtilleryShootBridge" (expand origin:(ahead (from)) Orthogonal)) "ArtilleryPanning" }) ) (piece "TinSoldier" Each (or { "InfantryMoves" }) ) (piece "Bishop" Each (or { "InfantryMoves" (if (= (state at:(from)) 1) (move Promote (from) (piece {"RiderOutline"}) Mover) ) }) maxState:100 ) (piece "RiderOutline" Each (or { "CavalryMoves" (if (= (state at:(from)) 1) (move Promote (from) (piece {"Bishop"}) Mover) ) }) ) (piece "WagonOutline" Each (or { ("ArtillerySlide" 8) "BuildBridge" "DeconstructBridge" "BuildBridgeGround" "DeconstructBridgeGround" "ArtilleryPanning" }) ) (regions "WaterRegion" (sites {343 344 345 346 347 348 349 350 301 302 303 254 205 156 107 58 9 10 59 255 256 399 448 497 498 547 596 645 694 695 744 793 842 841 840 839 838 837 836 835 834 833 882 883 884 933 934 885 886 935 887 891 940 989 1038 1037 1036 1035 1034 1033 1032 1031 1030 1029 1079 1128 1083 1132 1181 1230 1087 1136 1185 1088 1186 1234 1233 1232 1281 1282 1283 1332 1331 1330 1379 1380 1381 1430 1431 1479 1528 1529 1578 1577 1569 1570 1571 1572 1573 1574 1575 1576 1520 1471 1524 1475 1426 1377 1376 1375 1326 1277 1228 1229 1279 1328 1089 1090 1091 1140 1189 1190 1239 1240 1289 1338 1339 1388 1437 1486 1535 1584 1042 1043 1044 1045 1046 997 948 949 950 951 952 953 1002 1003 1004 955 1005 1006 1055 1007 1008 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1300 1251 1202 1153 1104 1352 1401 1450 1499 1500 1501 1353 1354 1355 1306 1257 1208 1159 1110 1061 1012 963 1356 1357 1358 1359 1360 1361 1362 1411 1460 1509 1558 1557 1606 1607 1313 1314 1315 1266 1267 1268 1269 1270 1271 1272 1273 1217 1168 1119 1070 1118 1069 1020 971 922 921 872 823 774 775 776 777 778 779 780 781 782 783 734 733 732 731 730 729 725 681 682 683 676 627 578 579 580 581 582 583 584 585 586 587 537 488 529 480 431 382 333 284 235 186 137 88 39 87 38 185 40 41 42 43 44 45 46 47 96 145 92 141 190 239 288 337 386 435 484 533 236 237 286 335 384 383 334 285 240 241 290 339 388 387 430 528 527 526 525 476 427 574 573 572 571 570 619 668 667 666 665 664 663 614 613 612 661 710 759 808 857 906 611 610 561 609 608 607 512 426 377 376 327 278 277 276 275 274 273 272 271 270 269 268 267 266 265 264 263 262 261 260 259 258 257 463 414 365 316 604 653 555 506 457 408 359 310 215 166 117 116 228 179 130 81 32})) (regions "MountainRegion" (sites {395 444 493 542 591 784 701 702 703 752 751 750 565 516 913 864 865 914 915 866 1299 1250 1296 1247 1394 1443 1492 1397 1446 1495 1502 1551 1503})) (regions "TownRegion" (sites {449 450 451 452 400 351 352 562 513 563 564 515 1052 1101 1053 1054 1103 1264 1265 1216 1167 1166 1165 1164})) (regions "ForestRegion" (sites {499 500 501 790 791 1432 1433 1201 1200 1395 1396 415 416 220 221 184 183 825 826 1117 1116 1115})) (regions "EntrenchmentRegion1" (sites {939 988 1086 1135 1184 1180 1131 1082 1425 1474 1523 1527 1478 1429})) (regions "EntrenchmentRegion2" (sites {932 936 888 889 890 1081})) (regions "EntrenchmentRegion3" (sites {677 628 530 481 432 534 485 436 191 142 93 187 138 89})) (regions "EntrenchmentRegion4" (sites {726 727 728 680 684 535})) }) (rules (meta (passEnd NoEnd)) (start { (place "Mountain0" (sites "MountainRegion")) (place "Town0" (sites "TownRegion")) (place "Forest0" (sites "ForestRegion")) (place "Triangle0" (sites "EntrenchmentRegion1") rotation:2 value:0) (place "Triangle0" (sites "EntrenchmentRegion2") rotation:4 value:0) (place "Triangle0" (sites "EntrenchmentRegion3") rotation:6 value:0) (place "Triangle0" (sites "EntrenchmentRegion4") rotation:0 value:0) (place "TinSoldier1" 1617 count:76 state:3) (place "TinSoldier2" 1623 count:76 state:3) (place "RiderOutline1" 1618 count:20 state:3) (place "RiderOutline2" 1624 count:20 state:3) (place "CannonOutline1" 1619 count:10 state:3) (place "CannonOutline2" 1625 count:10 state:3) (place "RegimentalOutline1" 1620 count:5 state:3) (place "RegimentalOutline2" 1626 count:5 state:3) (place "WagonOutline1" 1621 count:10 state:3) (place "WagonOutline2" 1627 count:10 state:3) (place "Square0" 1622 count:20 state:3) (place "Square0" 1628 count:20 state:3) (set Hidden (sites Hand P1) to:P2) (set Hidden (sites Hand P2) to:P1) (set Hidden (sites P2 "Home") to:P1) (set Hidden (sites P1 "Home") to:P2) }) phases:{ (phase "Placement" (play (or { ("PlacementMove" 0) ("PlacementMove" 2) ("PlacementMove" 4) ("PlacementMove" 6) }) ) (nextPhase (= 20 (count in:(sites Hand P2))) "BridgePlacement") ) (phase "BridgePlacement" (play (or // Add bridge to river (move (from (sites Occupied by:Neutral container:(mover) components:{"Square"})) (to (intersection { (sites Mover "Home") (sites "WaterRegion") (sites Empty) }) ) (then "EndBridgePlacementCheck" ) ) // Add bridge to bridge wagon (move Select (from (sites Occupied by:Neutral container:(mover) components:{"Square"})) (to (intersection (sites Mover "Home") (sites Occupied by:Mover container:"Board" components:{"WagonOutline"}) ) if:(< (value Piece at:(to)) 4) ) (then (do (and (set Value at:(last To) (+ (value Piece at:(last To)) 1)) (set Count at:(last From) (- (count at:(last From)) 1)) ) next:"EndBridgePlacementCheck" ) ) ) ) ) (nextPhase ("HandEmpty" P2) "FireSpread") ) (phase "FireSpread" (play (if (= (id Mover) 1) (or ("FireSpreadMoves" "RegionFire1" "Fires1")) (or ("FireSpreadMoves" "RegionFire2" "Fires2")) ) ) (nextPhase (was Pass) "Movement") ) (phase "Movement" (play (or (forEach Piece (then (and {(set State at:(last To) 0) (moveAgain)}))) (move Pass (then (and { (forEach Site (sites Occupied by:Mover container:"Board") (if (= (state at:(site)) 3) (set State at:(site) 1) ) ) "SetOccupiedEntrenchments" (moveAgain) }) ) ) ) ) (nextPhase (was Pass) "Actions") ) (phase "Actions" (play (or (forEach Piece (then (and {(set State at:(last To) 0) (set State at:(last From) 0) (moveAgain)}))) (move Pass (then (and { (forEach Site (sites Occupied by:Mover container:"Board") (set State at:(site) 3) ) "SetOccupiedEntrenchments" ("CheckFireSites" Mover) }) ) ) ) ) (nextPhase (was Pass) "FireSpread") ) } (end { (if (is In 1323 (sites Occupied by:P2 container:"Board")) (result P2 Win)) (if (is In 293 (sites Occupied by:P1 container:"Board")) (result P1 Win)) }) ) ) //------------------------------------------------------------------------------ (metadata (info { (description "Wikipedia Page") (rules "Modern translation of the original rules (German)") (id "1466") (version "1.3.12") (classification "board/war/replacement/eliminate/target") (credit "Matthew Stephenson") } ) (graphics { (board Colour Phase0 (colour 208 240 192)) (board Colour InnerEdges (colour Black)) (board Colour OuterEdges (colour Black)) (no Sunken) (region Colour "ForestRegion" (colour 0 100 0)) (region Colour "WaterRegion" (colour 28 98 216)) (region Colour "MountainRegion" (colour 194 154 118)) (region Colour "TownRegion" (colour 50 50 50)) (region Colour "RegionBridge" (colour 158 190 142)) (region Colour "RegionFire1" (colour 255 0 0)) (region Colour "RegionFire2" (colour 200 0 0)) (region Colour "RegionFireTemp" (colour 230 0 0)) (show Symbol "castle" Cell 1323 scale:0.9) (show Symbol "castle" Cell 293 scale:0.9) (piece Colour "Triangle" value:0 fillColour:(colour Orange)) (piece Colour "Triangle" value:1 fillColour:(colour Yellow)) (piece Colour "Triangle" value:2 fillColour:(colour Red)) (piece Scale "Square" 0.8) (piece Scale "TinSoldier" 0.6) (piece Scale "RegimentalOutline" 0.6) (piece Scale "CannonOutline" 0.6) (piece Scale "RiderOutline" 0.6) (piece Scale "WagonOutline" 0.6) (piece Colour P1 "TinSoldier" fillColour:(colour Black)) (piece Colour P2 "TinSoldier" fillColour:(colour White) strokeColour:(colour White)) (piece Colour P2 "RegimentalOutline" strokeColour:(colour White)) (piece Colour P2 "RiderOutline" strokeColour:(colour White)) (piece Colour P2 "CannonOutline" strokeColour:(colour White)) (piece Colour P2 "WagonOutline" strokeColour:(colour White)) (piece Background P1 image:"square" fillColour:(colour White) scale:0.8) (piece Background P2 image:"square" fillColour:(colour Black) scale:0.8) }) )