Use your mouse to interact with buttons. Spacebar can spin the slot machine.
A fork of Speak of the Devil - Alpha by trashoflevillage
xxxxxxxxxx
var currentVersion = "a1.2.2"
const rarityDisplay = {
0: "Common",
1: "Uncommon",
2: "Rare",
3: "Very Rare",
4: "Special"
}
const rarityColor = {
0: [168, 168, 168],
1: [168, 252, 252],
2: [252, 252, 168],
3: [255, 0, 255],
4: [252, 168, 252]
}
const rarityID = {
COMMON: 0,
UNCOMMON: 1,
RARE: 2,
VERY_RARE: 3,
SPECIAL: 4
};
const symbolLambda = {};
const perkLambda = {};
const prizeQueue = [];
function preload() {
let textureSize = 80;
frameRate(200);
// Symbol Lambdas
{
symbolLambda.SADCLOWN = () => { return new SadClown() };
symbolLambda.NONE = () => { return new None() };
symbolLambda.COIN = () => { return new Coin() };
symbolLambda.CHERRY = () => { return new Cherry() };
symbolLambda.PEARL = () => { return new Pearl() };
symbolLambda.FLOWER = () => { return new Flower() };
symbolLambda.CAT = () => { return new Cat() };
symbolLambda.COAL = () => { return new Coal() };
symbolLambda.DIAMOND = () => { return new Diamond() };
symbolLambda.DICE3 = () => { return new Dice3() };
symbolLambda.BEE = () => { return new Bee() };
symbolLambda.BOUNTYHUNTER = () => { return new BountyHunter() };
symbolLambda.THIEF = () => { return new Thief() };
symbolLambda.KEY = () => { return new Key() };
symbolLambda.LOCKBOX = () => { return new Lockbox() };
symbolLambda.SAFE = () => { return new Safe() };
symbolLambda.TREASURECHEST = () => { return new TreasureChest() };
symbolLambda.MAGICCHEST = () => { return new MagicChest() };
symbolLambda.MAGICKEY = () => { return new MagicKey() };
symbolLambda.WILDCARD = () => { return new Wildcard() };
symbolLambda.CULTIST = () => { return new Cultist() };
symbolLambda.DWARF = () => { return new Dwarf() };
symbolLambda.BEER = () => { return new Beer() };
symbolLambda.WINE = () => { return new Wine() };
symbolLambda.ORANGE = () => { return new Orange() };
symbolLambda.APPLE = () => { return new Apple() };
symbolLambda.WATERMELON = () => { return new Watermelon() };
symbolLambda.MELONSEEDS = () => { return new MelonSeeds() };
symbolLambda.MSFRUIT = () => { return new MsFruit() };
}
// Symbols
{
symbolsDict.SADCLOWN = new SadClown();
symbolsDict.NONE = new None();
symbolsDict.COIN = new Coin();
symbolsDict.CHERRY = new Cherry();
symbolsDict.PEARL = new Pearl();
symbolsDict.FLOWER = new Flower();
symbolsDict.CAT = new Cat();
symbolsDict.COAL = new Coal();
symbolsDict.DIAMOND = new Diamond();
symbolsDict.DICE3 = new Dice3();
symbolsDict.BEE = new Bee();
symbolsDict.BOUNTYHUNTER = new BountyHunter();
symbolsDict.THIEF = new Thief();
symbolsDict.KEY = new Key();
symbolsDict.LOCKBOX = new Lockbox();
symbolsDict.SAFE = new Safe();
symbolsDict.TREASURECHEST = new TreasureChest();
symbolsDict.MAGICCHEST = new MagicChest();
symbolsDict.MAGICKEY = new MagicKey();
symbolsDict.WILDCARD = new Wildcard();
symbolsDict.CULTIST = new Cultist();
symbolsDict.DWARF = new Dwarf();
symbolsDict.BEER = new Beer();
symbolsDict.WINE = new Wine();
symbolsDict.ORANGE = new Orange();
symbolsDict.APPLE = new Apple();
symbolsDict.WATERMELON = new Watermelon();
symbolsDict.MELONSEEDS = new MelonSeeds();
symbolsDict.MSFRUIT = new MsFruit();
}
// Perks
{
perksDict.PIZZATHECAT = new PizzaTheCat();
perksDict.COINONSTRING = new CoinOnString();
perksDict.LUCKYCARROT = new LuckyCarrot();
perksDict.COPYCAT = new Copycat();
perksDict.EIGHTBALL = new Eightball();
perksDict.LOCKPICK = new Lockpick();
}
// Perk Lambdas
{
perkLambda.PIZZATHECAT = () => { return new PizzaTheCat(); };
perkLambda.COINONSTRING = () => { return new CoinOnString() };
perkLambda.LUCKYCARROT = () => { return new LuckyCarrot() };
perkLambda.COPYCAT = () => { return new Copycat() };
perkLambda.EIGHTBALL = () => { return new Eightball() };
perkLambda.LOCKPICK = () => { return new Lockpick() };
}
// Textures
{
textures.spinButton = loadImage("SpinButton.png");
textures.spinButton_Hover = loadImage("SpinButton_Hover.png");
textures.spinButton_Clicked = loadImage("SpinButton_Pressed.png");
textures.cat = loadImage("Cat.png");
textures.flower = loadImage("Flower.png");
textures.pearl = loadImage("Pearl.png");
textures.coin = loadImage("Coin.png");
textures.cherry = loadImage("Cherry.png");
textures.empty = loadImage("Empty.png");
textures.diamond = loadImage("Diamond.png");
textures.dice3_1 = loadImage("Dice3_1.png");
textures.dice3_2 = loadImage("Dice3_2.png");
textures.dice3_3 = loadImage("Dice3_3.png");
textures.bee = loadImage("Bee.png");
textures.coal = loadImage("Coal.png");
textures.payButton = loadImage("PayButton.png");
textures.payButton_Hover = loadImage("PayButton_Hover.png");
textures.payButton_Clicked = loadImage("PayButton_Pressed.png");
textures.rentButton = loadImage("RentButton.png");
textures.rentButton_Hover = loadImage("RentButton_Hover.png");
textures.rentButton_Clicked = loadImage("RentButton_Pressed.png");
textures.prizesButton = loadImage("PrizesButton.png");
textures.prizesButton_Hover = loadImage("PrizesButton_Hover.png");
textures.prizesButton_Clicked = loadImage("PrizesButton_Pressed.png");
textures.prize_symbol = loadImage("Prize.png");
textures.prize_selected_symbol = loadImage("Prize_Selected.png");
textures.prize_perk = loadImage("PrizePerk.png");
textures.prize_selected_perk = loadImage("PrizePerk_Selected.png");
textures.skipButton = loadImage("SkipButton.png");
textures.skipButton_Hover = loadImage("SkipButton_Hover.png");
textures.skipButton_Clicked = loadImage("SkipButton_Pressed.png");
textures.thief = loadImage("Thief.png");
textures.bountyHunter = loadImage("BountyHunter.png");
textures.sadClown = loadImage("SadClown.png");
textures.key = loadImage("Key.png");
textures.magicKey = loadImage("MagicKey.png");
textures.lockbox = loadImage("Lockbox.png");
textures.safe = loadImage("Safe.png");
textures.treasureChest = loadImage("TreasureChest.png");
textures.magicChest = loadImage("MagicChest.png");
textures.pizzaTheCat = loadImage("PizzaTheCat.png");
textures.coinOnString = loadImage("CoinOnString.png");
textures.luckyCarrot = loadImage("LuckyCarrot.png");
textures.copycat = loadImage("Copycat.png");
textures.wildcard = loadImage("Wildcard.png");
textures.cultist = loadImage("Cultist.png");
textures.dwarf = loadImage("Dwarf.png");
textures.beer = loadImage("Beer.png");
textures.wine = loadImage("Wine.png");
textures.eightball = loadImage("Eightball.png");
textures.orange = loadImage("Orange.png");
textures.apple = loadImage("Apple.png");
textures.watermelon = loadImage("Watermelon.png");
textures.melonSeeds = loadImage("WatermelonSeeds.png");
textures.msFruit = loadImage("MsFruit.png");
textures.statButton = loadImage("StatButton.png");
textures.statButton_Hover = loadImage("StatButton_Hover.png");
textures.statButton_Clicked = loadImage("StatButton_Pressed.png");
textures.lockpick = loadImage("Lockpick.png");
textures.dailyButton = loadImage("DailyChallengeButton.png");
textures.dailyButton_Hover = loadImage("DailyChallengeButton_Hover.png");
textures.dailyButton_Clicked = loadImage("DailyChallengeButton_Pressed.png");
}
// Fonts
{
fonts["minecraft"] = loadFont("Minecraft.ttf");
}
}
let canvas;
const textures = {};
var currentGame;
var font;
const buttons = [];
var pressedButton;
var toTrigger = [];
const uiElements = [];
var currentTick = 0;
var bobAnimation;
var bobDistance = 0;
var bobTick = 0;
var bottomExclusion = [];
var triggeringSymbols = false;
const fonts = {};
var pathAnimations = [];
var triggerNext = false;
var animateCoins = false;
var animateCoinsStart;
var coinAnimDelay = 0;
const renderList = [];
var spins = 0;
var potentialSymbols = [];
var hoveredButton;
var knownDifference = 0;
const symbolsDict = {};
const perksDict = {};
var highscore = 0;
var dailyChallenge;