/*Instructions:
To use this, simply open up the dev console (in Chrome and Firefox, this is done with CTRL+SHIFT+I)
Select all in this file, then literally copy-paste it into the console that comes up, and hit enter.
Call the function by writing it's name, and subbing out the parameter names for the values you want to use, for example:
stripAllToLevel(2)
*/
var spnati_cheat_suits_list = ["heart", "clubs", "diamo", "spade"]
function validSuitOrDefault(suit, def){
/* Takes a suit as input. If the suit isn't a valid SPNATI suit name, then the specified default value is returned instead.
suit - The suit string to test.
def - The default value to return in the invalid case.
*/
return (spnati_cheat_suits_list.indexOf(suit) !== -1) ? suit : def;
}
function stripAllNaked(){
/*Strip everyone (except the PC) naked such that one round is left before they lose.*/
stripAllToLevel(1);
}
function stripNaked(player){
/*Strip all layers off of a given player (0 is the PC, 1-4 are NPCs).
Params: player - Integer (0 is the PC, 1-4 are NPCs)
*/
stripToLevel(player, 1);
}
function autoWin(){
/*Automatically win.*/
stripAllToLevel(0);
}
function stripAllToLevel(level){
/*Strip all players (except the PC) down so that they have at most _level_ number of layers left.
Params: level - Integer (The number of layers to leave left on a player.)
*/
for(var i = 1; i < players.length; i++){
stripToLevel(i, level);
}
}
function stripToLevel(player, level){
/*Strip a player down such that they only have (at most) a certain number of layers left.
Params: player - Integer (0 is the PC, 1-4 are NPCs)
level - Integer (The number of layers to leave left on a player.)
*/
for (var c = countClothing(player); c >= level; c--){stripChoice(player);}
}
function countClothing(player){
/* Count the clothing the player has remaining.
Params: Player - integer (0 is the PC, 1-4 are NPCs)
*/
var clothes = 0;
for (var i = 0; i < players[player].clothing.length; i++) {
if (players[player] && players[player].clothing[i]) {
clothes++;
}
}
return clothes;
}
function multiStripChoice(player, times){
/* Strip the indicated player of multiple layer.
Params: Player - integer (0 is the PC, 1-4 are NPCs)
times - integer (The number of layers to try to strip.)
*/
for(var i = 0; (i < times) && (countClothing(player) != -1); i++){
stripChoice(player);
}
}
function stripChoice(player){
/* Strip the indicated player of a single layer.
Params: Player - integer (0 is the PC, 1-4 are NPCs)
*/
stripPlayer(player);
updateAllGameVisuals();
}
function randomBackground(){
/*
Choose a random background from those available.
*/
//Note this randint helper function could either be inlined or broken out into an actual function.
var randint = function(a,b){
return (function(n,x){
return Math.floor(Math.random()*(x-n)+n);
})(Math.min(a,b), Math.max(a,b));
};
setBackground(function(){var a = randint(0,23); console.log(a); return a;}());
}
function unlockAllEndings(){
/*
Unlocks all the endings in the gallery mode.
NOTE: You can access the gallery by using the
command "loadGalleryScreen()" from the main menu.
*/
for(var i = 0; i < galleryEndings.length; i++)
{
galleryEndings[i].unlocked = true;
}
}
function givePlayerRoyalStraightFlush(player_number, suit){
/*
Gives the target player a royal straight flush of any desired suit.
player_number - An integer representing the player index getting the cards (0 -> player, 1-4 -> npcs)
suit - A string representing the suit (options are shown in the suits array below)
*/
var chosen_suit = validSuitOrDefault(suit, spnati_cheat_suits_list[0]);
hands[player_number].cards = [chosen_suit+"1", chosen_suit+"13", chosen_suit+"12", chosen_suit+"11", chosen_suit+"10"]
}
function giveSelfRoyalStraightFlush(suit){
/*
Gives the player a royal straight flush of the target suit.
suit - suit - A string representing the suit (either "heart", "clubs", "spade" or "diamo")
*/
givePlayerRoyalStraightFlush(0, suit);
}
var givePlayerRoyalStraightFlushFunctorMap = function(){
//This auto-gens a lookup table for the enableAutoRoyalStraightFlush functions.
var map = {};
for(var i = 0; i < players.length; i++){
map[i] = {}
for(var j = 0; j < spnati_cheat_suits_list.length; j++){
map[i][spnati_cheat_suits_list[j]] = function(i, j){return function(){givePlayerRoyalStraightFlush(i, spnati_cheat_suits_list[j])};}(i,j); //This double annon function is because closures in javascript are weird.
}
}
return map;
}();
function enableAutoRoyalStraightFlush(player_number, suit){
/*
Constantly gives the player a royal straight flush of the chosen suit, every single turn.
Note if this is done multiple times for different suits on the same player, only one of the suits will be shown
depending on order of application.
player_number - An integer representing the player index getting the cards (0 -> player, 1-4 -> npcs)
suit - A string representing the suit (either "heart", "clubs", "spade" or "diamo")
*/
suit = validSuitOrDefault(suit, spnati_cheat_suits_list[0]);
document.getElementById("main-game-button").addEventListener("click", givePlayerRoyalStraightFlushFunctorMap[player_number][suit]);
}
function disableAutoRoyalStraightFlush(player_number, suit){
/*
Disables a previously set "enableAutoRoyalStraightFlush" for a particular player and suit.
player_number - An integer representing the player index getting the cards (0 -> player, 1-4 -> npcs)
suit - A string representing the suit (either "heart", "clubs", "spade" or "diamo")
*/
suit = validSuitOrDefault(suit, spnati_cheat_suits_list[0]);
document.getElementById("main-game-button").removeEventListener("click", givePlayerRoyalStraightFlushFunctorMap[player_number][suit]);
}
function disableAllAutoRoyalStraightFlush(player_number){
for(var i = 0; i < spnati_cheat_suits_list.length; i++){
document.getElementById("main-game-button").removeEventListener("click", givePlayerRoyalStraightFlushFunctorMap[player_number][spnati_cheat_suits_list[i]]);
}
}
function enableSelfRoyalStraightFlush(){
enableAutoRoyalStraightFlush(0, "heart");
}
function disableSelfRoyalStraightFlush(){
disableAutoRoyalStraightFlush(0, "heart");
}
Spnati Cheats 2 - Pastebin.com (2024)
Top Articles
Homemade Shepherd's Pie Recipe (with Tips to Make it Perfect!)
Vegan Cheddar Cheese Recipe - Elavegan
Scheelzien, volwassenen - Alrijne Ziekenhuis
Coverage of the introduction of the Water (Special Measures) Bill
Erika Kullberg Wikipedia
Wells Fargo Careers Log In
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Over70Dating Login
Sotyktu Pronounce
Washington, D.C. - Capital, Founding, Monumental
Lonadine
Breakroom Bw
Worcester On Craigslist
Louisiana Sportsman Classifieds Guns
Busby, FM - Demu 1-3 - The Demu Trilogy - PDF Free Download
Palm Coast Permits Online
Pretend Newlyweds Nikubou Maranoshin
Tamilyogi Proxy
Libinick
Menards Eau Claire Weekly Ad
zom 100 mangadex - WebNovel
Amazing Lash Studio Casa Linda
Two Babies One Fox Full Comic Pdf
Engineering Beauties Chapter 1
Troy Gamefarm Prices
3Movierulz
Amelia Chase Bank Murder
Claio Rotisserie Menu
What Sells at Flea Markets: 20 Profitable Items
Firefly Festival Logan Iowa
Meijer Deli Trays Brochure
Imagetrend Elite Delaware
Uky Linkblue Login
Bozjan Platinum Coins
Buhsd Studentvue
Housing Intranet Unt
Lima Crime Stoppers
Brandon Spikes Career Earnings
8776725837
Wgu Admissions Login
Crigslist Tucson
Terrell Buckley Net Worth
5103 Liberty Ave, North Bergen, NJ 07047 - MLS 240018284 - Coldwell Banker
Bank Of America Appointments Near Me
Union Supply Direct Wisconsin
Ajpw Sugar Glider Worth
Big Brother 23: Wiki, Vote, Cast, Release Date, Contestants, Winner, Elimination
Chitterlings (Chitlins)
Electronics coupons, offers & promotions | The Los Angeles Times
Latest Posts
Article information
Author: Greg O'Connell
Last Updated:
Views: 6658
Rating: 4.1 / 5 (42 voted)
Reviews: 81% of readers found this page helpful
Author information
Name: Greg O'Connell
Birthday: 1992-01-10
Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519
Phone: +2614651609714
Job: Education Developer
Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding
Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.