$users[0]['bricks'] = 0; $users[0]['bricks_add'] = 0; $users[0]['gems'] = 0; $users[0]['gems_add'] = 0; $users[0]['monsters'] = 0; $users[0]['monsters_add'] = 0; $users[0]['win'] = 0; $users[0]['lose'] = 0; $users[0]['hod'] = 0; $kogo = 0; if ($arcomage['user1'] == $user_id) { $kogo = $arcomage['user2']; } else { $kogo = $arcomage['user1']; } make_action_card($users, $user_id, $kogo, $card); myquery("UPDATE arcomage_users SET bricks=" . $users[$user_id]['bricks'] . ",gems=" . $users[$user_id]['gems'] . ",monsters=" . $users[$user_id]['monsters'] . " WHERE user_id={$user_id}"); $charboy['bricks'] = $users[$user_id]['bricks']; $charboy['gems'] = $users[$user_id]['gems']; $charboy['monsters'] = $users[$user_id]['monsters']; } } //удалим у игрока сходвишую карту myquery("DELETE FROM arcomage_users_cards WHERE user_id='{$user_id}' AND arcomage_id='" . $charboy['arcomage_id'] . "' AND card_id='{$card}'"); //дадим игроку новую карту $new_card = get_new_card($charboy, $hod); myquery("INSERT INTO arcomage_users_cards (arcomage_id,user_id,card_id) VALUES ('" . $charboy['arcomage_id'] . "','{$user_id}','{$new_card}')"); } } } if (function_exists("save_debug")) {
} else { $cards2end[$kto] -= 1; $cards2end[$kto] += extra_hod($card); if ($cards2end[$kto] >= 0) { $users[0]['tower'] = $users[$kto]['tower']; $users[0]['wall'] = $users[$kto]['wall']; $users[0]['bricks'] = $users[$kto]['bricks']; $users[0]['bricks_add'] = $users[$kto]['bricks_add']; $users[0]['gems'] = $users[$kto]['gems']; $users[0]['gems_add'] = $users[$kto]['gems_add']; $users[0]['monsters'] = $users[$kto]['monsters']; $users[0]['monsters_add'] = $users[$kto]['monsters_add']; $users[0]['win'] = $users[$kto]['win']; $users[0]['lose'] = $users[$kto]['lose']; $users[0]['hod'] = $users[$kto]['hod']; make_action_card($users, 0, $kogo, $card); $users[$kto]['tower'] = $users[0]['tower']; $users[$kto]['wall'] = $users[0]['wall']; $users[$kto]['bricks_add'] = $users[0]['bricks_add']; $users[$kto]['gems_add'] = $users[0]['gems_add']; $users[$kto]['monsters_add'] = $users[0]['monsters_add']; $users[$kto]['win'] = $users[0]['win']; $users[$kto]['lose'] = $users[0]['lose']; $users[$kto]['hod'] = $users[0]['hod']; } } } $users[$arcomage['user1']]['bricks'] += $users[$arcomage['user1']]['bricks_add']; $users[$arcomage['user1']]['gems'] += $users[$arcomage['user1']]['gems_add']; $users[$arcomage['user1']]['monsters'] += $users[$arcomage['user1']]['monsters_add']; $users[$arcomage['user2']]['bricks'] += $users[$arcomage['user2']]['bricks_add'];