(define "RemovePiece" ) (define "SlideOrChangeDirection" (or (move Slide #1 (between #2) (to if:("IsEnemyAt" (to)) (apply "RemovePiece") ) ) (move Set Rotation) ) ) (define "StepOrChangeDirection" (or (move Step #1 (to if:(not ("IsFriendAt" (to))) (apply "RemovePiece") ) #2 ) (move Set Rotation) ) ) (define "CaptureCommandeOf" (trigger "CommanderCaptured" #1)) (define "CommanderOfWasCapture" (is Triggered "CommanderCaptured" #1)) (define "CaptureCommandeOf" (trigger "CommanderCaptured" #1)) (define "CommanderOfWasCapture" (is Triggered "CommanderCaptured" #1)) //------------------------------------------------------------------------------ (game "Ploy" (players ) (equipment { (board (square 9) use:Vertex) (piece "Commander" Each ("StepOrChangeDirection" (directions {FR FL BL BR} of:All))) (piece "Shield" Each ("StepOrChangeDirection" (directions Forward of:All) (then (moveAgain)))) (piece "LanceW" Each ("SlideOrChangeDirection" (directions Forwards of:All) (max 3))) (piece "LanceY" Each ("SlideOrChangeDirection" (directions {FR FL Backward} of:All) (max 3))) (piece "LanceT" Each ("SlideOrChangeDirection" (directions {Forward Rightward Leftward} of:All) (max 3))) (piece "ProbeI" Each ("SlideOrChangeDirection" (directions {Forward Backward} of:All) (max 2))) (piece "ProbeMinV" Each ("SlideOrChangeDirection" (directions {Forward FR} of:All) (max 2))) (piece "ProbeBigV" Each ("SlideOrChangeDirection" (directions {FR FL} of:All) (max 2))) }) (rules (start { }) (play (if "SameTurn" (or (move Set Rotation (to (last To))) (move Pass) ) (forEach Piece ) ) ) ) ) //------------------------------------------------------------------------------ (option "Version" args:{ } { (item "2 Players" <2> <> <(remove (to))> < (place "Commander1" coord:"E1" rotation:0) (place "Shield1" {"D3" "E3" "F3"} rotation:0) (place "ProbeI1" coord:"E2" rotation:0) (place "ProbeBigV1" {"D2" "F2"} rotation:0) (place "ProbeMinV1" coord:"C2" rotation:0) (place "ProbeMinV1" coord:"G2" rotation:7) (place "LanceW1" {"D1" "F1"} rotation:0) (place "LanceY1" {"C1" "G1"} rotation:0) (place "LanceT1" {"B1" "H1"} rotation:0) (place "Commander2" coord:"E9" rotation:4) (place "Shield2" {"D7" "E7" "F7"} rotation:4) (place "ProbeI2" coord:"E8" rotation:4) (place "ProbeBigV2" {"D8" "F8"} rotation:4) (place "ProbeMinV2" coord:"C8" rotation:3) (place "ProbeMinV2" coord:"G8" rotation:4) (place "LanceW2" {"D9" "F9"} rotation:4) (place "LanceY2" {"C9" "G9"} rotation:4) (place "LanceT2" {"B9" "H9"} rotation:4) > <> < (end (if (or ("IsOffBoard" (where "Commander" Next)) (= (count Pieces Next) 1) ) (result Mover Win) ) ) > "The two players version of Ploy." )** (item "4 Players" <4> < > < (and { (if (= (what at:(to)) (id "Commander" P1)) (and ("CaptureCommandeOf" P1) (take Control of:P1 by:Mover))) (if (= (what at:(to)) (id "Commander" P2)) (and ("CaptureCommandeOf" P2) (take Control of:P2 by:Mover))) (if (= (what at:(to)) (id "Commander" P3)) (and ("CaptureCommandeOf" P3) (take Control of:P3 by:Mover))) (if (= (what at:(to)) (id "Commander" P4)) (and ("CaptureCommandeOf" P4) (take Control of:P4 by:Mover))) (remove (to)) }) > < (place "Commander1" coord:"A1" rotation:1) (place "Shield1" {"C2" "B3" "C3"} rotation:1) (place "ProbeBigV1" coord:"B2" rotation:1) (place "ProbeMinV1" coord:"A3" rotation:2) (place "ProbeMinV1" coord:"C1" rotation:7) (place "LanceW1" coord:"A2" rotation:1) (place "LanceT1" coord:"B1" rotation:1) (place "Commander2" coord:"A9" rotation:1) (place "Shield2" {"B7" "C7" "C8"} rotation:3) (place "ProbeBigV2" coord:"B8" rotation:3) (place "ProbeMinV2" coord:"A7" rotation:1) (place "ProbeMinV2" coord:"C9" rotation:5) (place "LanceW2" coord:"B9" rotation:3) (place "LanceT2" coord:"A8" rotation:3) (place "Commander3" coord:"I9" rotation:1) (place "Shield3" {"G7" "H7" "G8"} rotation:5) (place "ProbeBigV3" coord:"H8" rotation:5) (place "ProbeMinV3" coord:"I7" rotation:6) (place "ProbeMinV3" coord:"G9" rotation:3) (place "LanceW3" coord:"I8" rotation:5) (place "LanceT3" coord:"H9" rotation:5) (place "Commander4" coord:"I1" rotation:1) (place "Shield4" {"G3" "H3" "G2"} rotation:7) (place "ProbeBigV4" coord:"H2" rotation:7) (place "ProbeMinV4" coord:"I3" rotation:5) (place "ProbeMinV4" coord:"G1" rotation:0) (place "LanceW4" coord:"H1" rotation:7) (place "LanceT4" coord:"I2" rotation:7) > < (then (and { (if (= (count Pieces P1) 1) (and ("CaptureCommandeOf" P1) (remove (where "Commander" P1)))) (if (= (count Pieces P2) 1) (and ("CaptureCommandeOf" P2) (remove (where "Commander" P2)))) (if (= (count Pieces P3) 1) (and ("CaptureCommandeOf" P3) (remove (where "Commander" P3)))) (if (= (count Pieces P4) 1) (and ("CaptureCommandeOf" P4) (remove (where "Commander" P4)))) }) ) > < (end { (if ("CommanderOfWasCapture" P1) (result P1 Loss)) (if ("CommanderOfWasCapture" P2) (result P2 Loss)) (if ("CommanderOfWasCapture" P3) (result P3 Loss)) (if ("CommanderOfWasCapture" P4) (result P4 Loss)) }) > "The four players version with no team of Ploy." ) (item "4 Players With Team" <4> < > < (and { (if (= (what at:(to)) (id "Commander" P1)) ("CaptureCommandeOf" P1)) (if (= (what at:(to)) (id "Commander" P2)) ("CaptureCommandeOf" P2)) (if (= (what at:(to)) (id "Commander" P3)) ("CaptureCommandeOf" P3)) (if (= (what at:(to)) (id "Commander" P4)) ("CaptureCommandeOf" P4)) (remove (to)) }) > < (set Team 1 {P1 P3}) (set Team 2 {P2 P4}) (place "Commander1" coord:"C9" rotation:0) (place "Shield1" {"B7" "C7" "D7"} rotation:4) (place "ProbeBigV1" coord:"C8" rotation:4) (place "ProbeMinV1" coord:"B8" rotation:3) (place "ProbeMinV1" coord:"D8" rotation:4) (place "LanceW1" coord:"D9" rotation:4) (place "LanceT1" coord:"B9" rotation:4) (place "Commander2" coord:"C1" rotation:0) (place "Shield2" {"B3" "C3" "D3"} rotation:0) (place "ProbeBigV2" coord:"C2" rotation:0) (place "ProbeMinV2" coord:"B2" rotation:0) (place "ProbeMinV2" coord:"D2" rotation:7) (place "LanceW2" coord:"D1" rotation:0) (place "LanceT2" coord:"B1" rotation:0) (place "Commander3" coord:"G9" rotation:0) (place "Shield3" {"F7" "G7" "H7"} rotation:4) (place "ProbeBigV3" coord:"G8" rotation:4) (place "ProbeMinV3" coord:"F8" rotation:3) (place "ProbeMinV3" coord:"H8" rotation:4) (place "LanceW3" coord:"F9" rotation:4) (place "LanceT3" coord:"H9" rotation:4) (place "Commander4" coord:"G1" rotation:0) (place "Shield4" {"F3" "G3" "H3"} rotation:0) (place "ProbeBigV4" coord:"G2" rotation:0) (place "ProbeMinV4" coord:"F2" rotation:0) (place "ProbeMinV4" coord:"H2" rotation:7) (place "LanceW4" coord:"F1" rotation:0) (place "LanceT4" coord:"H1" rotation:0) > < (then (and { (if (= (count Pieces P1) 1) ("CaptureCommandeOf" P1)) (if (= (count Pieces P2) 1) ("CaptureCommandeOf" P2)) (if (= (count Pieces P3) 1) ("CaptureCommandeOf" P3)) (if (= (count Pieces P4) 1) ("CaptureCommandeOf" P4)) })) > < (end { (if (and ("CommanderOfWasCapture" P2) ("CommanderOfWasCapture" P4)) (result Team1 Win)) (if (and ("CommanderOfWasCapture" P1) ("CommanderOfWasCapture" P3)) (result Team2 Win)) } ) > "The four players version with no team of Ploy." ) }) //------------------------------------------------------------------------------ (metadata (info { (description "Ploy was invented by Frank Thibault in 1970. It can be played by two or four players and the goal is to capture the opponent's Commander.") (rules "The goal is to capture the enemy Commander, or reduce the opponent army to a single Commander. Each piece has an indicator which determines at which directions the piece can move. This can be altered by rotating the piece 45 degrees= to the left or right. Rotating the piece costs a move. Each player has 3 Shields, 5 Probes, 6 Lances, and one Commander. The Shield moves one step and has only one movement freedom at any time. The Probe slides two steps and has two freedoms. The Lance slides three steps and has three freedoms. The Commander has four, but can only move one step. A player must either make a direction move or a motion move. The three Shields are the only pieces that can perform a direction move immediately after a motion move. Capture occurs by displacement.") (source "mlwi.magix.net") (id "408") (version "1.3.12") (classification "board/war/replacement/eliminate/target") (author "Frank Thibault") (publisher "3M, Dujardin, Grow Jogos e Brinquedos, Schmid") (credit "Eric Piette") (date "1970") } ) (graphics { (player Colour P1 (colour Green)) (player Colour P2 (colour Red)) (player Colour P3 (colour Yellow)) (player Colour P4 (colour Blue)) (show Edges Outer Hidden) (show Edges Diagonal Thin (colour 102 0 153)) (show Edges Inner Thin (colour 102 0 153)) (board Background image:"Square.svg" fillColour:(colour 153 0 204) edgeColour:(colour 153 0 204) scale:1.3) (show Symbol "Disc" (sites Board) fillColour:(colour 102 0 153) edgeColour:(colour 102 0 153) scale:0.5) }) (ai "Ploy_ai" ) )