Novicane - SPNATI Cheat

Collection of cheats for the browser game SPNATI, put into a large userscript for ease of use

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Novicane - SPNATI Cheat
// @namespace    https://www.github.com/anonfoxer
// @version      0.2.0
// @description  Collection of cheats for the browser game SPNATI, put into a large userscript for ease of use
// @author       anonfoxer
// @match        https://spnati.net/
// @grant        none
// ==/UserScript==


/* Making the buttons and appending them all
just underneath the name bubble of each character.
Kinda roundabout but eh. */

//cheat name button because flair is important.
var cheatNameDummy = document.createElement("button");
cheatNameDummy.innerHTML = "Novicane v0.2.0";
var gameVers = document.getElementById("title-version-button");
gameVers.appendChild(cheatNameDummy);

//enable debug bbutton
var enableDebugButton = document.createElement("button");
enableDebugButton.innerHTML = "Enable Debug mode";
var body = document.getElementById("player-name-label-minimal");
document.body.appendChild(enableDebugButton);

//win hand button
var winHandButton = document.createElement("button");
winHandButton.innerHTML = "Win Hand";
document.body.appendChild(winHandButton);

//instant epilogue button
/*
var instantEpilogueButton = document.createElement("button");
instantEpilogueButton.innerHTML = "Instant Epilogue";
document.body.appendChild(instantEpilogueButton);
*/

//debug Listener
enableDebugButton.addEventListener ("click", function() {
    try{
        console.log("Attempting to enable debug mode...")
        DEBUG = true;
        updateDebugState(true);
        console.log("Debug mode enabled.");
    }
    catch (e) {
        console.log("An error occured when trying to enable debug mode: " + e);
        alert("Failed to enable debug mode. Check console for details!");
    }
});

//win hand listener
winHandButton.addEventListener ("click", function() {
    players[0].hand.cards = [ 14, 13, 12, 11, 10 ].map(function(n) { return new Card(0 - 1, n); });
});


//instant epilogue listener
/*
instantEpilogueButton.addEventListener ("click", function() {
    var character = prompt("Enter the name of the character you want to see the epilogue of. They must have an epilogue written.","raven");
    console.log(character);
    doEpilogueModal(character);
});
*/