diff options
author | Arun Persaud <arun@nubati.net> | 2009-06-24 21:56:37 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2009-06-24 23:15:52 -0700 |
commit | 1ce0838714ea7db3fc3557cb79f1ad82d8bfd708 (patch) | |
tree | 27c0577ecc63ca92ab542cf4c361cd9e8f258715 | |
parent | 993fc6fffd6c43498c756ef73f8fd27eb4fadce1 (diff) | |
download | e-DoKo-1ce0838714ea7db3fc3557cb79f1ad82d8bfd708.tar.gz e-DoKo-1ce0838714ea7db3fc3557cb79f1ad82d8bfd708.tar.bz2 e-DoKo-1ce0838714ea7db3fc3557cb79f1ad82d8bfd708.zip |
display both foxes as playable, if the game doesn't allow schweinche, but the rules do
in case you play with a single schweinchen (only the second one becomes highest trump), but the game doesn't allow schweinchen (e.g. queen solo), both foxes should be selectable, but only one was. Fixes issue #53
-rw-r--r-- | include/game.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/include/game.php b/include/game.php index f612b20..564c5c4 100644 --- a/include/game.php +++ b/include/game.php @@ -67,7 +67,7 @@ if( $gamestatus == 'pre' ) else { /* in a game Schweinchen is not valid in all types of games */ - if( $gametype == 'normal' || $gametype == 'silent' || $gametype=='trump' || $gametype=='wedding') + if( in_array($gametype,array('normal','wedding','trump','silent') )) if( in_array($RULES['schweinchen'],array('both','second','secondaftercall')) ) $ok=1; } @@ -1915,11 +1915,17 @@ switch($mystatus) * also check if we have both schweinchen, in that case only display on of them as playable */ if( ($followsuit && !same_type($card,$firstcard)) || - ( (int)($card)==19 && !$GAME['schweinchen-first'] && - ($RULES['schweinchen']=='second'|| - ( $RULES['schweinchen']=='secondaftercall' && - (DB_get_call_by_hash($GAME['schweinchen-who']) || DB_get_partner_call_by_hash($GAME['schweinchen-who']) ))) - && $GAME['schweinchen-who']==$me ) + ( (int)($card)==19 && + !$GAME['schweinchen-first'] && + ( $RULES['schweinchen']=='second' || + ( $RULES['schweinchen']=='secondaftercall' && + (DB_get_call_by_hash($GAME['schweinchen-who']) || + DB_get_partner_call_by_hash($GAME['schweinchen-who']) ) + ) + ) && + $GAME['schweinchen-who']==$me && + in_array($gametype,array('normal','wedding','trump','silent')) + ) ) display_card($card,$PREF['cardset']); else |