April Fool's 2016

This commit is contained in:
Guangcong Luo
2016-04-02 03:03:21 -04:00
parent 7acfc3ccef
commit 19d3e7aa2f
3 changed files with 27 additions and 11 deletions

View File

@@ -3178,17 +3178,20 @@ var Battle = (function () {
}
this.message(pokemon.getName() + ' used <strong>Fissure</strong>!');
this.message('Just kidding! It was <strong>Earthquake</strong>!');
} else if (window.Config && Config.server && Config.server.afd && (move.id === 'metronome' || move.id === 'sleeptalk' || move.id === 'assist')) {
this.message(pokemon.getName() + ' used <strong>' + move.name + '</strong>!');
var buttons = ["A", "B", "START", "SELECT", "UP", "DOWN", "LEFT", "RIGHT", "DEMOCRACY", "ANARCHY"];
var people = ["Zarel", "The Immortal", "Diatom", "Nani Man", "shaymin", "apt-get", "sirDonovan", "Arcticblast", "Trickster"];
var button;
for (var i = 0; i < 10; i++) {
var name = people[Math.floor(Math.random() * people.length)];
if (!button) button = buttons[Math.floor(Math.random() * buttons.length)];
this.log('<div class="chat"><strong style="' + hashColor(toUserid(name)) + '" class="username" data-name="' + Tools.escapeHTML(name) + '">' + Tools.escapeHTML(name) + ':</strong> <em>' + button + '</em></div>');
button = (name === 'Diatom' ? "thanks diatom" : null);
}
} else if (window.Config && Config.server && Config.server.afd && move.id === 'stealthrock') {
var srNames = ['Sneaky Pebbles', 'Sly Rubble', 'Subtle Sediment', 'Buried Bedrock', 'Camouflaged Cinnabar', 'Clandestine Cobblestones', 'Cloaked Clay', 'Concealed Ore', 'Covert Crags', 'Crafty Coal', 'Discreet Bricks', 'Disguised Debris', 'Espionage Pebbles', 'Furtive Fortress', 'Hush-Hush Hardware', 'Incognito Boulders', 'Invisible Quartz', 'Masked Minerals', 'Mischievous Masonry', 'Obscure Ornaments', 'Private Paragon', 'Secret Solitaire', 'Sheltered Sand', 'Surreptitious Sapphire', 'Undercover Ultramarine'];
this.message(pokemon.getName() + ' used <strong>' + srNames[Math.floor(Math.random() * srNames.length)] + '</strong>!');
// } else if (window.Config && Config.server && Config.server.afd && (move.id === 'metronome' || move.id === 'sleeptalk' || move.id === 'assist')) {
// this.message(pokemon.getName() + ' used <strong>' + move.name + '</strong>!');
// var buttons = ["A", "B", "START", "SELECT", "UP", "DOWN", "LEFT", "RIGHT", "DEMOCRACY", "ANARCHY"];
// var people = ["Zarel", "The Immortal", "Diatom", "Nani Man", "shaymin", "apt-get", "sirDonovan", "Arcticblast", "Trickster"];
// var button;
// for (var i = 0; i < 10; i++) {
// var name = people[Math.floor(Math.random() * people.length)];
// if (!button) button = buttons[Math.floor(Math.random() * buttons.length)];
// this.log('<div class="chat"><strong style="' + hashColor(toUserid(name)) + '" class="username" data-name="' + Tools.escapeHTML(name) + '">' + Tools.escapeHTML(name) + ':</strong> <em>' + button + '</em></div>');
// button = (name === 'Diatom' ? "thanks diatom" : null);
// }
} else {
this.message(pokemon.getName() + ' used <strong>' + move.name + '</strong>!');
}

View File

@@ -12,6 +12,8 @@
'dragover .roomtab': 'dragEnterRoom'
},
initialize: function () {
// April Fool's 2016 - Digimon Showdown
// this.$el.html('<img class="logo" src="' + Tools.resourcePrefix + 'sprites/afd/digimonshowdown.png" alt="Digimon Showdown! (beta)" width="146" height="44" /><div class="maintabbarbottom"></div><div class="tabbar maintabbar"><div class="inner"></div></div><div class="userbar"></div>');
this.$el.html('<img class="logo" src="' + Tools.resourcePrefix + 'pokemonshowdownbeta.png" alt="Pok&eacute;mon Showdown! (beta)" /><div class="maintabbarbottom"></div><div class="tabbar maintabbar"><div class="inner"></div></div><div class="userbar"></div>');
this.$tabbar = this.$('.maintabbar .inner');
// this.$sidetabbar = this.$('.sidetabbar');
@@ -679,6 +681,10 @@
buf += '<p class="bgstatus"></p>';
buf += '<p><button name="close"><strong>Done</strong></button></p>';
// April Fool's 2016 - background change disabling
// buf = '<p>Sorry, the background chooser is experiencing technical difficulties. Please try again tomorrow!</p><p><button name="close"><strong>Done</strong></button></p>';
this.$el.css('max-width', 448).html(buf);
this.$el.html(buf);
},

View File

@@ -68,6 +68,11 @@ Storage.bg = {
}
bgUrl = Tools.resourcePrefix + 'fx/client-bg-' + bgid + '.jpg';
}
// April Fool's 2016 - Digimon theme
// bgid = 'digimon';
// bgUrl = Tools.resourcePrefix + 'sprites/afd/digimonbg.jpg';
var background;
if (bgUrl.charAt(0) === '#') {
background = bgUrl;
@@ -98,6 +103,8 @@ Storage.bg = {
case 'charizards':
hues = ["37.159090909090914,74.57627118644066%", "10.874999999999998,70.79646017699115%", "179.51612903225808,52.10084033613446%", "20.833333333333336,36.73469387755102%", "192.3076923076923,80.41237113402063%", "210,29.629629629629633%"];
break;
case 'digimon':
hues = ["170.45454545454544,27.500000000000004%", "84.70588235294119,13.821138211382115%", "112.50000000000001,7.8431372549019605%", "217.82608695652175,54.761904761904766%", "0,1.6949152542372816%", ""];
}
if (!hues && bgUrl.charAt(0) === '#') {
var r = parseInt(bgUrl.slice(1, 3), 16) / 255;