| Author |
Message |
Robert Bailey (Gregolex)
New member Username: Gregolex
Post Number: 1 Registered: 10-2007
| | Posted on Thursday, October 18, 2007 - 12:03 am: | |
I'm tyring to figure out how to give a piece in chess a movement ability that can only be used once. For example say I want the pawn's opening two-square move to be dependent one whether it's been used or not, rather than on what position it's in. Also, is there a general tutorial on editing rules files? I can't find one and am still trying to figure out a lot of the syntax. |
Edward Holzman (Edholzman)
New member Username: Edholzman
Post Number: 4 Registered: 6-2005
| | Posted on Thursday, October 18, 2007 - 7:48 am: | |
The best way to accomplish what you are trying is through the use of flags. Have a flag set (or reset) when the power of a piece is used. The ZRF language Help file is actually helpful. For more information, check out Jens Markmann's page on ZRF writing: http://underworld.fortunecity.com/fifa/73/zrf.html I would recommend getting a nice text editing tool such as ConTEXT. There is an old ConTEXT package available for download from the Zillions site: http://www.zillionsofgames.com/ConTEXT.html This package includes the highlighter file you will need to help with editing ZRF files in ConTEXT. You can update to the most recent version of ConTEXT itself by visitng the website for it: http://www.context.cx/ |
Robert Bailey (Gregolex)
New member Username: Gregolex
Post Number: 2 Registered: 10-2007
| | Posted on Thursday, October 18, 2007 - 4:13 pm: | |
So could someone tell me what's wrong with this? (define Pawn-first ( (verify never-moved?) zp (verify empty?) (set-attribute never-moved? false) add) ) for some reason when I move I get a message asking which move I want to make, and gives me two identical options; both equal to the space i chose. |
Robert Bailey (Gregolex)
New member Username: Gregolex
Post Number: 3 Registered: 10-2007
| | Posted on Thursday, October 18, 2007 - 4:14 pm: | |
(define Pawn-move ( z0 (verify empty?) (set-attribute never-moved? false) (Pawn-add) add ) ) (define Pawn-first ( (verify never-moved?) zp (verify empty?) (set-attribute never-moved? false) add) ) |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 43 Registered: 1-2007
| | Posted on Friday, October 19, 2007 - 12:47 am: | |
You could also define an xPawn, which has the capability of moving two steps (and one step). But in the move definition you make (add Pawn) instead of a simple add. The Pawn, unlike the xPawn, can only move one step, and its image is the same as xPawn. This is the simplest method, I believe. /Mats |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 44 Registered: 1-2007
| | Posted on Friday, October 19, 2007 - 12:49 am: | |
That is, in the move definition of the two-step move, you make (add Pawn) /Mats |