修复富甲天下自由点将无限刷金币BUG
This commit is contained in:
parent
5dffc03b14
commit
16a391f74a
Binary file not shown.
Binary file not shown.
|
@ -131,8 +131,12 @@ game.import("play", function () {
|
|||
}
|
||||
},
|
||||
game: {
|
||||
changeCoin: function (num) {
|
||||
changeCoin: function (num,toast) {
|
||||
if (typeof num == "number" && ui.coin) {
|
||||
if(num!=0 && toast!== false){
|
||||
game.playAudio('effect',num > 0?"coin":"coin_cost");
|
||||
ui.create.toast(`${num > 0 ? "获得":"花费"} ${num} 金币`);
|
||||
}
|
||||
game.saveConfig("coin", lib.config.coin + num);
|
||||
var str;
|
||||
if (lib.config.coin_display_playpackconfig == "text") {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.toast-container {
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
top: 15%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
|
|
@ -1718,7 +1718,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
ui.cheat2 = ui.create.control("自由选将", function () {
|
||||
if (this.dialog == _status.event.dialog) {
|
||||
if (game.changeCoin) {
|
||||
game.changeCoin(50);
|
||||
game.changeCoin(10);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog = this.backup;
|
||||
|
|
|
@ -3420,7 +3420,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
ui.cheat2 = ui.create.control("自由选将", function () {
|
||||
if (this.dialog == _status.event.dialog) {
|
||||
if (game.changeCoin) {
|
||||
game.changeCoin(50);
|
||||
game.changeCoin(10);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog = this.backup;
|
||||
|
|
|
@ -4306,7 +4306,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
ui.cheat2 = ui.create.control("自由选将", function () {
|
||||
if (this.dialog == _status.event.dialog) {
|
||||
if (game.changeCoin) {
|
||||
game.changeCoin(50);
|
||||
game.changeCoin(10);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog = this.backup;
|
||||
|
|
|
@ -1094,7 +1094,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
ui.cheat2 = ui.create.control("自由选将", function () {
|
||||
if (this.dialog == _status.event.dialog) {
|
||||
if (game.changeCoin) {
|
||||
game.changeCoin(50);
|
||||
game.changeCoin(10);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog = this.backup;
|
||||
|
|
|
@ -22429,7 +22429,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
ui.cheat2 = ui.create.control("自由选将", function () {
|
||||
if (this.dialog == _status.event.dialog) {
|
||||
if (game.changeCoin) {
|
||||
game.changeCoin(50);
|
||||
game.changeCoin(10);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog = this.backup;
|
||||
|
|
|
@ -2303,7 +2303,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
ui.cheat2 = ui.create.control("自由选将", function () {
|
||||
if (this.dialog == _status.event.dialog) {
|
||||
if (game.changeCoin) {
|
||||
game.changeCoin(50);
|
||||
game.changeCoin(10);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog = this.backup;
|
||||
|
|
|
@ -2486,7 +2486,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
ui.cheat2 = ui.create.control("自由选将", function () {
|
||||
if (this.dialog == _status.event.dialog) {
|
||||
if (game.changeCoin) {
|
||||
game.changeCoin(50);
|
||||
game.changeCoin(10);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog = this.backup;
|
||||
|
|
|
@ -841,7 +841,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
ui.cheat2 = ui.create.control("自由选将", function () {
|
||||
if (this.dialog == _status.event.dialog) {
|
||||
if (game.changeCoin) {
|
||||
game.changeCoin(50);
|
||||
game.changeCoin(10);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog = this.backup;
|
||||
|
@ -1115,7 +1115,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
ui.cheat2 = ui.create.control("自由选将", function () {
|
||||
if (this.dialog == _status.event.dialog) {
|
||||
if (game.changeCoin) {
|
||||
game.changeCoin(50);
|
||||
game.changeCoin(10);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog = this.backup;
|
||||
|
@ -1446,7 +1446,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
ui.cheat2 = ui.create.control("自由选将", function () {
|
||||
if (this.dialog == _status.event.dialog) {
|
||||
if (game.changeCoin) {
|
||||
game.changeCoin(50);
|
||||
game.changeCoin(10);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog = this.backup;
|
||||
|
@ -1637,7 +1637,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
ui.cheat2 = ui.create.control("自由选将", function () {
|
||||
if (this.dialog == _status.event.dialog) {
|
||||
if (game.changeCoin) {
|
||||
game.changeCoin(50);
|
||||
game.changeCoin(10);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog = this.backup;
|
||||
|
|
|
@ -360,7 +360,7 @@ export class Create {
|
|||
return container;
|
||||
})();
|
||||
const toast = document.createElement("div");
|
||||
toast.textContent = message;
|
||||
toast.innerHTML = message;
|
||||
toast.classList.add("toast");
|
||||
toastContainer.appendChild(toast);
|
||||
ui.toastQueue.push(toast);
|
||||
|
|
Loading…
Reference in New Issue