From ea32376a2bfabec06dc5276b79ecd9d110a09715 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 2 Nov 2010 12:02:49 +0100 Subject: [PATCH] Switch back to absolute royalty when value = -1 This is achieved by simulating we only have one such piece --- data/fmax.ini | 7 ++++--- fairymax.c | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/data/fmax.ini b/data/fmax.ini index 26c1f56..a684c2e 100644 --- a/data/fmax.ini +++ b/data/fmax.ini @@ -180,10 +180,11 @@ initial setup (where you specify them by number, not letter). Pieces with negative values are considered royal. If one side has more than one royal piece of the same type, he loses if the _last_ one is captured. +This means any 'spare' royal pieces can be sacrificed, and the exchange +value assumed for them will be the absolute value of what you defined. +With a value -1, however, loss of the first piece of that type loses the game. For royal piece types larger than 7 there is the special rule that it is not -allowed to leave more than one of them under attack. This means the 'spare' -royal pieces can be sacrificed, and the exchange value assumed for them will -be the absolute value of what you define for them. +allowed to leave more than one of them under attack ('duple check'). NOTE: piece value 181 for piece 7 is reserved for Makruk, and enables promotion on the 6th rank. Do not use it in other variants. diff --git a/fairymax.c b/fairymax.c index 0c1fc81..0eaaf2d 100644 --- a/fairymax.c +++ b/fairymax.c @@ -373,6 +373,8 @@ InitGame() K=BW;W(K--) {b[K]=oo[K+16]+16;b[K+112]=oo[K];b[K+16]=18;b[K+96]=1; /* initial board setup*/ pl[oo[K+16]+16]++;pl[oo[K]]++;pl[18]++;pl[1]++; + if(w[oo[K+16]+16] == -1)pl[oo[K+16]+16]=1; + if(w[oo[K]] == -1)pl[oo[K]]=1; L=8;W(L--)b[16*L+K+257]=(K-BW/2)*(K-BW/2)+(L-3.5)*(L-3.5); /* center-pts table */ } /*(in unused half b[])*/ Side = WHITE; Q=0; O=S; @@ -813,6 +815,7 @@ int main(int argc, char **argv) break; } pl[BLACK+WHITE-color]++;pl[p+color]++; + if(w[p+color] == -1)pl[p+color]=1; // fake we have one if value = -1, to thwart extinction condition continue; } } -- 1.7.0.4