+ else if ($a_card <= 9) {
+ $ret_s = "";
+
+ 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)
+ && $a_pnt <= 120) {
+ if ($a_pnt < 71)
+ $min_pts = 13;
+ else if ($a_pnt < 80)
+ $min_pts = 19;
+ else if ($a_pnt < 90)
+ $min_pts = 23;
+ else if ($a_pnt < 100)
+ $min_pts = 25;
+ else
+ $min_pts = 28;
+
+ $max_hand_pts = $this->tourn_points_max($user);
+ if ($max_hand_pts < $min_pts) {
+ // FIXME_LANG
+ $ret_s = sprintf("Hai chiamato un due a %d ma in mano hai al massimo %d punti-torneo, non puoi.",
+ $a_pnt, $max_hand_pts);
+ break;
+ }
+ }
+ else {
+ break;
+ }
+
+ $user->asta_card = $a_card;
+ $this->table->asta_card = $a_card;
+ if ($a_card == 9) {
+ $user->asta_pnt = $a_pnt;
+ $this->table->asta_pnt = $a_pnt;
+ }
+
+ return TRUE;
+ } while (0);
+ }
+