diff --git a/mainwindow.cpp b/mainwindow.cpp index 8a5833336b80287681fbbb8969bc477871032aa4..3f936ab13f2a3c92cc490da8ba010b26005a746f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -234,7 +234,8 @@ void MainWindow::on_SellButton_clicked() else{ chance = QRandomGenerator::global()->bounded(0,2); if(chance==1){ - msgBox.setText("Le marchand a échangé les BakaCoins de Bakachan contre des NFT Bakayen, elle ne sait pas trop ce que c'est mais c'est sûrement des supers bakayens.\nVous possédez maintenant " + QString::number(bakaCoin) + " NFT Bakayen!"); + bakayen+=bakaCoin; + msgBox.setText("Le marchand a échangé les BakaCoins de Bakachan contre des NFT Bakayen, elle ne sait pas trop ce que c'est mais c'est sûrement des supers bakayens.\nVous possédez maintenant " + QString::number(bakayen) + " NFT Bakayen!"); } else{ msgBox.setText("Oh non! Un méchant barman a volé tous les Bakacoins de Bakachan. Il ne lui reste plus qu'à retourner à la mine. :("); diff --git a/mainwindow.h b/mainwindow.h index bf387bb7b8393bbe4465e92418a92e7a3f06a6f0..39d3a7f9355d2a35969eeaa895e03148f74f8362 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -44,6 +44,7 @@ private: int monsterSize; int damage; int bakaCoin=0; + int bakayen=0; QPixmap mine_1_pic; QPixmap mine_2_pic; QPixmap mine_3_pic;