X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=brisk.git;a=blobdiff_plain;f=web%2Fbriskin5%2FObj%2Frules_together17.phh;h=c57c03e9854a7960daeada2c308b5883df240928;hp=36133984908fc4d1c0fd0962b743fb0cca216f9a;hb=e03584c986979bad9c4d469abe3e60c37911e002;hpb=827cf9b1db2abe2e726ac97063f90445244cf99f diff --git a/web/briskin5/Obj/rules_together17.phh b/web/briskin5/Obj/rules_together17.phh index 3613398..c57c03e 100644 --- a/web/briskin5/Obj/rules_together17.phh +++ b/web/briskin5/Obj/rules_together17.phh @@ -37,7 +37,10 @@ class Rules_together17 extends Rules_no_draw { $card = $this->table->card; unset($user->asta_tourn_pts); $user->asta_tourn_pts = array(0, 0, 0, 0); - $tourn_values = array(11, 10, 4,3,2, 1,1,1,1,1); + if (BIN5_CARD_HAND == 8) + $tourn_values = array(11, 10, 4,3,2, 1,1,1,1,1); + else + $tourn_values = array(33, 30, 12,9,6, 3,3,3,3,3); for ($i = 0 ; $i < BIN5_PLAYERS_N * BIN5_CARD_HAND ; $i++) { @@ -84,6 +87,13 @@ oppure asso, tre, cavallo, 7, 6, 5 e 4 ). $user->asta_card = -1; $this->table->asta_pla_n--; + if ($this->table->asta_card == -1 && $this->table->asta_pla_n == 1) { + error_log('table_asta_card: ' . $this->table->asta_card); + // all abandon auction except one => move next bid to two and 71 points + $this->table->asta_card = 9; + $this->table->asta_pnt = 70; + } + return TRUE; } else if ($a_card <= 9) { @@ -91,7 +101,7 @@ oppure asso, tre, cavallo, 7, 6, 5 e 4 ). do { if ($a_card >= 0 && $a_card < 9 && $a_card > $this->table->asta_card) { - return TRUE; + ; } else if ($a_card == 9 && $a_pnt > ($this->table->asta_pnt >= 61 ? $this->table->asta_pnt : 60) @@ -133,6 +143,18 @@ oppure asso, tre, cavallo, 7, 6, 5 e 4 ). return FALSE; } + function rules_nextauct(&$bri, $curtime, $action, $user, $maxcard) + { + if (($this->table->asta_pla_n > ($maxcard > -1 ? 1 : 0)) && + !($this->table->asta_card == 9 && $this->table->asta_pnt == 120)) { + return TRUE; + } + else { + return FALSE; + } + + } + } // class Rules_no_draw ?> \ No newline at end of file