├── .gitignore ├── legacy_scripts ├── setdex_gsc.js ├── setdex_rby.js ├── setdex_sm.js ├── setdex_bdsp.js ├── setdex_sv.js ├── setdex_dpp.js ├── setdex_xy.js ├── setdex_rse.js ├── setdex_ss.js ├── setdex_bw.js ├── damage_SM-SS.js ├── setdex_vgc2022.js └── status_item_data.js ├── afd_res ├── unused_afd │ ├── delta_move_data.js │ ├── delta_damage.js │ ├── delta_item_data.js │ └── deltadex.js ├── old_afd │ ├── digi_move_data.js │ ├── statuscalc_old.js │ ├── digisetdex.js │ └── digidex.js ├── pokedex_afd24.js ├── setdex_afd24.js ├── spamton.js └── noise.js ├── image_res ├── 133.png ├── 784.png ├── logo.png ├── save.png ├── scorch.png ├── trash.png ├── favicon.ico ├── scorchOG.png ├── select2.png ├── togemon.png ├── Tatsugiri.png ├── empty-slot.png ├── select2x2.png ├── toge_crit.png ├── toge_normal.png ├── Favicon-32px.ico ├── trainertower.png ├── urshifu-rapid.png ├── Weakness_Policy.png ├── gigantamax-icon.png ├── minisprites │ ├── 249.png │ ├── 250.png │ ├── 382.png │ ├── 383.png │ ├── 384.png │ ├── 483.png │ ├── 484.png │ ├── 487.png │ ├── 643.png │ ├── 644.png │ ├── 646.png │ ├── 716.png │ ├── 717.png │ ├── 718.png │ ├── 784.png │ ├── 789.png │ ├── 790.png │ ├── 791.png │ ├── 792.png │ ├── 800.png │ ├── dawn.png │ ├── dusk.png │ ├── 487-1.png │ ├── 646-1.png │ ├── 646-2.png │ ├── 718-1.png │ └── ultra.png ├── sandstream_laser.png ├── select2-spinner.gif ├── urshifu-single.png ├── urshifu-rapid-text.png ├── urshifu-single-text.png ├── aprilfoolsday │ ├── noisedies.gif │ ├── noisefear.gif │ ├── noiseidle.gif │ ├── noisestun.gif │ ├── noisewalk.gif │ ├── spamdance.gif │ ├── spamhurt.png │ ├── spamlaugh.gif │ ├── noisesmile.gif │ ├── peppinorun.gif │ ├── peppinoattack.gif │ └── spamlaugh_big.gif ├── Logo Nimbasa City Post PNG.png ├── Logo Nimbasa City Post Black Text PNG.png └── Logo Nimbasa City Post White Text PNG.png ├── sound_res ├── Noise2.ogg ├── Scream.ogg ├── Sfx_step.ogg ├── Noisescream.ogg ├── Sfx_mach3.ogg ├── Sfx_breakmetal.ogg ├── spamton_battle.ogg ├── snd_smallcar_yelp.ogg └── spamton_laugh_noise.ogg ├── script_res ├── move_data.js ├── nature_data.js ├── setdex_dynamic.js ├── statuscalc.js ├── stat_data.js ├── css ├── setdex_smogon.js ├── damage_rby.js ├── dark_nb_calc.css ├── nb_calc_old.css ├── nb_calc.css ├── damage_gsc.js ├── damage_xy.js ├── dark_ap_calc.css ├── switch_mode.js ├── ap_calc.css ├── damage_SV.js ├── ability_data.js ├── sidebars.js ├── damage_rse.js └── setdex_boss-titan.js ├── debug.log ├── spamtontest.html ├── README.md ├── noisetest.html ├── LICENSE └── index.sublime-workspace /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | /.vs 3 | -------------------------------------------------------------------------------- /legacy_scripts/setdex_gsc.js: -------------------------------------------------------------------------------- 1 | var SETDEX_GSC={}; -------------------------------------------------------------------------------- /legacy_scripts/setdex_rby.js: -------------------------------------------------------------------------------- 1 | var SETDEX_RBY={}; -------------------------------------------------------------------------------- /afd_res/unused_afd/delta_move_data.js: -------------------------------------------------------------------------------- 1 | var MOVES_DELTA = {}; -------------------------------------------------------------------------------- /afd_res/unused_afd/delta_damage.js: -------------------------------------------------------------------------------- 1 | function CALCULATE_DAMAGE_DELTARUNE() { 2 | 3 | } -------------------------------------------------------------------------------- /image_res/133.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/133.png -------------------------------------------------------------------------------- /image_res/784.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/784.png -------------------------------------------------------------------------------- /image_res/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/logo.png -------------------------------------------------------------------------------- /image_res/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/save.png -------------------------------------------------------------------------------- /image_res/scorch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/scorch.png -------------------------------------------------------------------------------- /image_res/trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/trash.png -------------------------------------------------------------------------------- /sound_res/Noise2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/sound_res/Noise2.ogg -------------------------------------------------------------------------------- /sound_res/Scream.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/sound_res/Scream.ogg -------------------------------------------------------------------------------- /image_res/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/favicon.ico -------------------------------------------------------------------------------- /image_res/scorchOG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/scorchOG.png -------------------------------------------------------------------------------- /image_res/select2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/select2.png -------------------------------------------------------------------------------- /image_res/togemon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/togemon.png -------------------------------------------------------------------------------- /sound_res/Sfx_step.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/sound_res/Sfx_step.ogg -------------------------------------------------------------------------------- /image_res/Tatsugiri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/Tatsugiri.png -------------------------------------------------------------------------------- /image_res/empty-slot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/empty-slot.png -------------------------------------------------------------------------------- /image_res/select2x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/select2x2.png -------------------------------------------------------------------------------- /image_res/toge_crit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/toge_crit.png -------------------------------------------------------------------------------- /image_res/toge_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/toge_normal.png -------------------------------------------------------------------------------- /script_res/move_data.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/script_res/move_data.js -------------------------------------------------------------------------------- /sound_res/Noisescream.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/sound_res/Noisescream.ogg -------------------------------------------------------------------------------- /sound_res/Sfx_mach3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/sound_res/Sfx_mach3.ogg -------------------------------------------------------------------------------- /image_res/Favicon-32px.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/Favicon-32px.ico -------------------------------------------------------------------------------- /image_res/trainertower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/trainertower.png -------------------------------------------------------------------------------- /image_res/urshifu-rapid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/urshifu-rapid.png -------------------------------------------------------------------------------- /debug.log: -------------------------------------------------------------------------------- 1 | [1226/122447.826:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3) 2 | -------------------------------------------------------------------------------- /image_res/Weakness_Policy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/Weakness_Policy.png -------------------------------------------------------------------------------- /image_res/gigantamax-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/gigantamax-icon.png -------------------------------------------------------------------------------- /image_res/minisprites/249.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/249.png -------------------------------------------------------------------------------- /image_res/minisprites/250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/250.png -------------------------------------------------------------------------------- /image_res/minisprites/382.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/382.png -------------------------------------------------------------------------------- /image_res/minisprites/383.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/383.png -------------------------------------------------------------------------------- /image_res/minisprites/384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/384.png -------------------------------------------------------------------------------- /image_res/minisprites/483.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/483.png -------------------------------------------------------------------------------- /image_res/minisprites/484.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/484.png -------------------------------------------------------------------------------- /image_res/minisprites/487.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/487.png -------------------------------------------------------------------------------- /image_res/minisprites/643.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/643.png -------------------------------------------------------------------------------- /image_res/minisprites/644.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/644.png -------------------------------------------------------------------------------- /image_res/minisprites/646.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/646.png -------------------------------------------------------------------------------- /image_res/minisprites/716.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/716.png -------------------------------------------------------------------------------- /image_res/minisprites/717.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/717.png -------------------------------------------------------------------------------- /image_res/minisprites/718.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/718.png -------------------------------------------------------------------------------- /image_res/minisprites/784.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/784.png -------------------------------------------------------------------------------- /image_res/minisprites/789.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/789.png -------------------------------------------------------------------------------- /image_res/minisprites/790.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/790.png -------------------------------------------------------------------------------- /image_res/minisprites/791.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/791.png -------------------------------------------------------------------------------- /image_res/minisprites/792.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/792.png -------------------------------------------------------------------------------- /image_res/minisprites/800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/800.png -------------------------------------------------------------------------------- /image_res/minisprites/dawn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/dawn.png -------------------------------------------------------------------------------- /image_res/minisprites/dusk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/dusk.png -------------------------------------------------------------------------------- /image_res/sandstream_laser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/sandstream_laser.png -------------------------------------------------------------------------------- /image_res/select2-spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/select2-spinner.gif -------------------------------------------------------------------------------- /image_res/urshifu-single.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/urshifu-single.png -------------------------------------------------------------------------------- /sound_res/Sfx_breakmetal.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/sound_res/Sfx_breakmetal.ogg -------------------------------------------------------------------------------- /sound_res/spamton_battle.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/sound_res/spamton_battle.ogg -------------------------------------------------------------------------------- /image_res/minisprites/487-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/487-1.png -------------------------------------------------------------------------------- /image_res/minisprites/646-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/646-1.png -------------------------------------------------------------------------------- /image_res/minisprites/646-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/646-2.png -------------------------------------------------------------------------------- /image_res/minisprites/718-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/718-1.png -------------------------------------------------------------------------------- /image_res/minisprites/ultra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/minisprites/ultra.png -------------------------------------------------------------------------------- /image_res/urshifu-rapid-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/urshifu-rapid-text.png -------------------------------------------------------------------------------- /sound_res/snd_smallcar_yelp.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/sound_res/snd_smallcar_yelp.ogg -------------------------------------------------------------------------------- /image_res/urshifu-single-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/urshifu-single-text.png -------------------------------------------------------------------------------- /sound_res/spamton_laugh_noise.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/sound_res/spamton_laugh_noise.ogg -------------------------------------------------------------------------------- /image_res/aprilfoolsday/noisedies.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/noisedies.gif -------------------------------------------------------------------------------- /image_res/aprilfoolsday/noisefear.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/noisefear.gif -------------------------------------------------------------------------------- /image_res/aprilfoolsday/noiseidle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/noiseidle.gif -------------------------------------------------------------------------------- /image_res/aprilfoolsday/noisestun.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/noisestun.gif -------------------------------------------------------------------------------- /image_res/aprilfoolsday/noisewalk.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/noisewalk.gif -------------------------------------------------------------------------------- /image_res/aprilfoolsday/spamdance.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/spamdance.gif -------------------------------------------------------------------------------- /image_res/aprilfoolsday/spamhurt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/spamhurt.png -------------------------------------------------------------------------------- /image_res/aprilfoolsday/spamlaugh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/spamlaugh.gif -------------------------------------------------------------------------------- /image_res/Logo Nimbasa City Post PNG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/Logo Nimbasa City Post PNG.png -------------------------------------------------------------------------------- /image_res/aprilfoolsday/noisesmile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/noisesmile.gif -------------------------------------------------------------------------------- /image_res/aprilfoolsday/peppinorun.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/peppinorun.gif -------------------------------------------------------------------------------- /image_res/aprilfoolsday/peppinoattack.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/peppinoattack.gif -------------------------------------------------------------------------------- /image_res/aprilfoolsday/spamlaugh_big.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/aprilfoolsday/spamlaugh_big.gif -------------------------------------------------------------------------------- /image_res/Logo Nimbasa City Post Black Text PNG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/Logo Nimbasa City Post Black Text PNG.png -------------------------------------------------------------------------------- /image_res/Logo Nimbasa City Post White Text PNG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerd-of-now/NCP-VGC-Damage-Calculator/HEAD/image_res/Logo Nimbasa City Post White Text PNG.png -------------------------------------------------------------------------------- /afd_res/old_afd/digi_move_data.js: -------------------------------------------------------------------------------- 1 | var MOVES_SM = { 2 | '(No Move)': { 3 | bp: 0, 4 | type: 'Normal', 5 | category: 'Physical' 6 | }, 7 | 'Needlespray': { 8 | bp: 0, 9 | type: 'Grass', 10 | category: 'Physical' 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /spamtontest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VGC 2024 Damage Calculator 2 | Originally the official Nuggetbridge damage calculator 2015-2016, later adapted for Trainer Tower 2017-2020, now adapted for Nimbasa City Post from 2021-present. Maintained and developed by nerd-of-now. 3 | 4 | If there are inaccuracies please submit an issue or pull request! 5 | 6 | Credits and license 7 | ------------------- 8 | 9 | MIT License. 10 | 11 | Written by Honko. VGC 2015 Update by Tapin and Firestorm. VGC 2016, 2017, 2018, 2019, and 2020 done by squirrelboyVGC. VGC 2021 onwards done by nerd-of-now. -------------------------------------------------------------------------------- /afd_res/pokedex_afd24.js: -------------------------------------------------------------------------------- 1 | var POKEDEX_AFD24 = { 2 | "Spamton": { 3 | "t1": "Dark", 4 | "t2": "Fairy", 5 | "bs": { 6 | "hp": 198, 7 | "at": 88, 8 | "df": 88, 9 | "sa": 88, 10 | "sd": 88, 11 | "sp": 88, 12 | }, 13 | "w": 8.8, 14 | "ab": "Toxic Chain", 15 | }, 16 | "The Noise": { 17 | "t1": "Electric", 18 | "bs": { 19 | "hp": 255, 20 | "at": 255, 21 | "df": 255, 22 | "sa": 255, 23 | "sd": 255, 24 | "sp": 255, 25 | }, 26 | "w": 50.0, 27 | "ab": "Wonder Guard", 28 | }, 29 | }; -------------------------------------------------------------------------------- /afd_res/old_afd/statuscalc_old.js: -------------------------------------------------------------------------------- 1 | var ISAPRILFOOLS = false; 2 | $( document ).ready(function() { 3 | var d = new Date(); 4 | var month = d.getMonth() + 1; 5 | var day = d.getDate(); 6 | notloadedyet = true; 7 | if($('body').prop("loaded")){ 8 | notloadedyet = false; 9 | } 10 | if(month == 4 && day == 1 && notloadedyet){ 11 | ISAPRILFOOLS = true; 12 | //it's april fools motherfuckers 13 | //buckle up 14 | $('body').empty(); 15 | $('body').load("digicalc.html", function(){ 16 | $('body').prop("loaded", true) 17 | $('#reverse').click(function(){ 18 | $('body').empty(); 19 | $('body').load("standardbody.html"); 20 | }) 21 | }); 22 | } 23 | }); 24 | -------------------------------------------------------------------------------- /script_res/nature_data.js: -------------------------------------------------------------------------------- 1 | var NATURES = { 2 | 'Adamant':['at','sa'], 3 | 'Bashful':['',''], 4 | 'Bold':['df','at'], 5 | 'Brave':['at','sp'], 6 | 'Calm':['sd','at'], 7 | 'Careful':['sd','sa'], 8 | 'Docile':['',''], 9 | 'Gentle':['sd','df'], 10 | 'Hardy':['',''], 11 | 'Hasty':['sp','df'], 12 | 'Impish':['df','sa'], 13 | 'Jolly':['sp','sa'], 14 | 'Lax':['df','sd'], 15 | 'Lonely':['at','df'], 16 | 'Mild':['sa','df'], 17 | 'Modest':['sa','at'], 18 | 'Naive':['sp','sd'], 19 | 'Naughty':['at','sd'], 20 | 'Quiet':['sa','sp'], 21 | 'Quirky':['',''], 22 | 'Rash':['sa','sd'], 23 | 'Relaxed':['df','sp'], 24 | 'Sassy':['sd','sp'], 25 | 'Serious':['',''], 26 | 'Timid':['sp','at'] 27 | }; 28 | -------------------------------------------------------------------------------- /noisetest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | -------------------------------------------------------------------------------- /legacy_scripts/setdex_sm.js: -------------------------------------------------------------------------------- 1 | var SETDEX_SM = {}; 2 | var SETDEX_CUSTOM_SM = {}; 3 | 4 | var components = [ 5 | SETDEX_TT2019 6 | ]; 7 | 8 | for (var i=0; i { 15 | var spams = 0; 16 | spam_laff.setAttribute('src', 'image_res/aprilfoolsday/spamdance.gif'); 17 | //spam_laff.setAttribute('onclick', 'spam_hit(this)'); 18 | document.getElementById('spam_mus').play(); 19 | var intervalID = setInterval(() => { 20 | if (spams == 71) { 21 | var deleteSpam = false; 22 | var nestedIntervalID = setInterval(() => { 23 | if (!deleteSpam) { 24 | $('.spamdancers').attr('src', 'image_res/aprilfoolsday/spamlaugh.gif'); 25 | document.getElementById('spam_laugh').play(); 26 | deleteSpam = true; 27 | } 28 | else { 29 | $('#spamtons').empty(); 30 | clearInterval(nestedIntervalID); 31 | } 32 | }, 863); 33 | clearInterval(intervalID); 34 | spamton_isrunning = false; 35 | } 36 | else { 37 | spam_inloop(w, h); 38 | spams++; 39 | } 40 | }, 909); 41 | }, 1113); 42 | } 43 | 44 | function spam_inloop(w, h) { 45 | var randX = Math.round(Math.random() * w), randY = Math.round(Math.random() * h); 46 | var spam_sus = document.createElement('img'); 47 | spam_sus.setAttribute('class', 'spamdancers'); 48 | spam_sus.setAttribute('src', 'image_res/aprilfoolsday/spamdance.gif'); 49 | spam_sus.setAttribute('style', 'position: fixed; right: ' + randX + 'px; bottom: ' + randY + 'px;'); 50 | //spam_sus.setAttribute('onclick', 'spam_hit(this)'); 51 | document.getElementById('spamtons').appendChild(spam_sus); 52 | } 53 | 54 | //function spam_hit(spam_hurt) { 55 | // spam_hurt.setAttribute('src', 'image_res/aprilfoolsday/spamhurt.png'); 56 | // document.getElementById('spam_hit').play(); 57 | // spam_hurt.removeAttribute('onclick'); 58 | //} -------------------------------------------------------------------------------- /index.sublime-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "auto_complete": 3 | { 4 | "selected_items": 5 | [ 6 | ] 7 | }, 8 | "buffers": 9 | [ 10 | ], 11 | "build_system": "", 12 | "build_system_choices": 13 | [ 14 | ], 15 | "build_varint": "", 16 | "command_palette": 17 | { 18 | "height": 0.0, 19 | "last_filter": "", 20 | "selected_items": 21 | [ 22 | ], 23 | "width": 0.0 24 | }, 25 | "console": 26 | { 27 | "height": 0.0, 28 | "history": 29 | [ 30 | ] 31 | }, 32 | "distraction_free": 33 | { 34 | "menu_visible": true, 35 | "show_minimap": false, 36 | "show_open_files": false, 37 | "show_tabs": false, 38 | "side_bar_visible": false, 39 | "status_bar_visible": false 40 | }, 41 | "file_history": 42 | [ 43 | ], 44 | "find": 45 | { 46 | "height": 0.0 47 | }, 48 | "find_in_files": 49 | { 50 | "height": 0.0, 51 | "where_history": 52 | [ 53 | ] 54 | }, 55 | "find_state": 56 | { 57 | "case_sensitive": false, 58 | "find_history": 59 | [ 60 | ], 61 | "highlight": true, 62 | "in_selection": false, 63 | "preserve_case": false, 64 | "regex": false, 65 | "replace_history": 66 | [ 67 | ], 68 | "reverse": false, 69 | "show_context": true, 70 | "use_buffer2": true, 71 | "whole_word": false, 72 | "wrap": true 73 | }, 74 | "groups": 75 | [ 76 | { 77 | "sheets": 78 | [ 79 | ] 80 | } 81 | ], 82 | "incremental_find": 83 | { 84 | "height": 0.0 85 | }, 86 | "input": 87 | { 88 | "height": 0.0 89 | }, 90 | "layout": 91 | { 92 | "cells": 93 | [ 94 | [ 95 | 0, 96 | 0, 97 | 1, 98 | 1 99 | ] 100 | ], 101 | "cols": 102 | [ 103 | 0.0, 104 | 1.0 105 | ], 106 | "rows": 107 | [ 108 | 0.0, 109 | 1.0 110 | ] 111 | }, 112 | "menu_visible": true, 113 | "output.find_results": 114 | { 115 | "height": 0.0 116 | }, 117 | "pinned_build_system": "", 118 | "project": "index.sublime-project", 119 | "replace": 120 | { 121 | "height": 0.0 122 | }, 123 | "save_all_on_build": true, 124 | "select_file": 125 | { 126 | "height": 0.0, 127 | "last_filter": "", 128 | "selected_items": 129 | [ 130 | ], 131 | "width": 0.0 132 | }, 133 | "select_project": 134 | { 135 | "height": 0.0, 136 | "last_filter": "", 137 | "selected_items": 138 | [ 139 | ], 140 | "width": 0.0 141 | }, 142 | "select_symbol": 143 | { 144 | "height": 0.0, 145 | "last_filter": "", 146 | "selected_items": 147 | [ 148 | ], 149 | "width": 0.0 150 | }, 151 | "selected_group": 0, 152 | "settings": 153 | { 154 | }, 155 | "show_minimap": true, 156 | "show_open_files": false, 157 | "show_tabs": true, 158 | "side_bar_visible": true, 159 | "side_bar_width": 150.0, 160 | "status_bar_visible": true, 161 | "template_settings": 162 | { 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /script_res/setdex_smogon.js: -------------------------------------------------------------------------------- 1 | var SETDEX_SMOGON={ 2 | "Milotic": { 3 | "Smogon Milotic": { 4 | "level": 50, 5 | "evs": { 6 | "hp": 252, 7 | "at": 0, 8 | "df": 76, 9 | "sa": 172, 10 | "sd": 4, 11 | "sp": 4 12 | }, 13 | "nature": "Calm", 14 | "ability": "", 15 | "item": "Sitrus Berry", 16 | "moves": [ 17 | "Scald", 18 | "Ice Beam", 19 | "", 20 | "" 21 | ] 22 | } 23 | }, 24 | 25 | "Celesteela": { 26 | "Smogon Celesteela": { 27 | "level": 50, 28 | "evs": { 29 | "hp": 228, 30 | "at": 44, 31 | "df": 116, 32 | "sa": 0, 33 | "sd": 116, 34 | "sp": 4 35 | }, 36 | "nature": "Adamant", 37 | "ability": "", 38 | "item": "Leftovers", 39 | "moves": [ 40 | "Heavy Slam", 41 | "Flamethrower", 42 | "", 43 | "", 44 | ] 45 | } 46 | }, 47 | 48 | "Marowak-Alola": { 49 | "Smogon Marowak": { 50 | "level": 50, 51 | "evs": { 52 | "hp": 252, 53 | "at": 180, 54 | "df": 4, 55 | "sa": 0, 56 | "sd": 68, 57 | "sp": 4 58 | }, 59 | "nature": "Adamant", 60 | "ability": "Lightning Rod", 61 | "item": "Thick Club", 62 | "moves": [ 63 | "Flare Blitz", 64 | "Shadow Bone", 65 | "Bonemerang", 66 | "" 67 | ] 68 | } 69 | }, 70 | 71 | "Metagross": { 72 | "Smogon AV Metagross": { 73 | "level": 50, 74 | "evs": { 75 | "hp": 252, 76 | "at": 252, 77 | "df": 4, 78 | "sa": 0, 79 | "sd": 0, 80 | "sp": 0 81 | }, 82 | "nature": "Adamant", 83 | "ability": "Clear Body", 84 | "item": "Assault Vest", 85 | "moves": [ 86 | "Meteor Mash", 87 | "Bullet Punch", 88 | "Zen Headbutt", 89 | "Hammer Arm" 90 | ] 91 | }, 92 | 93 | "Smogon Banded Metagross": { 94 | "level": 50, 95 | "evs": { 96 | "hp": 252, 97 | "at": 252, 98 | "df": 4, 99 | "sa": 0, 100 | "sd": 0, 101 | "sp": 0 102 | }, 103 | "nature": "Adamant", 104 | "ability": "Clear Body", 105 | "item": "Choice Band", 106 | "moves": [ 107 | "Meteor Mash", 108 | "Bullet Punch", 109 | "Zen Headbutt", 110 | "Hammer Arm" 111 | ] 112 | } 113 | }, 114 | 115 | "Krookodile": { 116 | "Smogon Krook": { 117 | "level": 50, 118 | "evs": { 119 | "hp": 52, 120 | "at": 156, 121 | "df": 44, 122 | "sa": 0, 123 | "sd": 4, 124 | "sp": 252 125 | }, 126 | "nature": "Jolly", 127 | "ability": "Intimidate", 128 | "item": "", 129 | "moves": [ 130 | "Earthquake", 131 | "Crunch", 132 | "", 133 | "" 134 | ] 135 | } 136 | }, 137 | } -------------------------------------------------------------------------------- /afd_res/unused_afd/delta_item_data.js: -------------------------------------------------------------------------------- 1 | var ITEMS_DELTA_CH1 = { 2 | 'Sword': { 3 | 'Wood Blade': { 4 | 'at': 0 5 | }, 6 | 'Trefoil': { 7 | 'at': 4, 8 | isUnused: true 9 | }, 10 | 'Spookysword': { 11 | 'at': 2 12 | }, 13 | }, 14 | 'Ax': { 15 | 'Devilsknife': { 16 | 'at': 5, 17 | 'ma': 4 18 | }, 19 | 'Mane Ax': { 20 | 'at': 0 21 | }, 22 | 'Brave Ax': { 23 | 'at': 2 24 | }, 25 | }, 26 | 'Scarf': { 27 | 'Ragger': { 28 | 'at': 2 29 | }, 30 | 'Dainty Scarf': { 31 | 'ma': 2 32 | }, 33 | 'Red Scarf': { 34 | 'at': 0 35 | }, 36 | }, 37 | 'All': { 38 | 'Everybody Weapon': { 39 | 'at': 12, 40 | 'df': 6, 41 | 'ma': 8, 42 | isUnused: true 43 | } 44 | }, 45 | 'Armor': { 46 | 'White Ribbon': { 47 | 'df': 2 48 | }, 49 | 'Amber Card': { 50 | 'df': 1 51 | }, 52 | 'Iron Shackle': { 53 | 'at': 1, 54 | 'df': 2 55 | }, 56 | 'Dice Brace': { 57 | 'df': 2 58 | }, 59 | 'Mouse Token': { 60 | 'df': 1, 61 | 'ma': 2, 62 | isUnused: true 63 | }, 64 | 'Jevilstail': { 65 | 'at': 2, 66 | 'df': 2, 67 | 'ma': 2 68 | }, 69 | }, 70 | }; 71 | 72 | var ITEMS_DELTA_CH2 = $.extend({}, ITEMS_DELTA_CH1, { 73 | 'Sword': { 74 | 'Mecha Saber': { 75 | 'at': 4 76 | }, 77 | 'Twisted Sword': { 78 | 'at': 16, 79 | isUnused: true 80 | }, 81 | 'Bounce Blade': { 82 | 'at': 2, 83 | 'df': 1 84 | }, 85 | }, 86 | 'Ax': { 87 | 'Auto Axe': { 88 | 'at': 4 89 | }, 90 | }, 91 | 'Scarf': { 92 | 'Fiber Scarf': { 93 | 'at': 2, 94 | 'ma': 2 95 | }, 96 | 'Ragger2': { 97 | 'at': 5, 98 | 'ma': -1 99 | }, 100 | 'Cheer Scarf': { 101 | 'at': 1, 102 | 'ma': 2, 103 | isUnused: true 104 | }, 105 | 'Puppet Scarf': { 106 | 'at': 10, 107 | 'ma': -6 108 | }, 109 | }, 110 | 'Ring': { 111 | 'Freeze Ring': { 112 | 'at': 4, 113 | 'ma': 4 114 | }, 115 | 'Thorn Ring': { 116 | 'at': 14, 117 | 'ma': 12 118 | }, 119 | 'Snow Ring': { 120 | 'at': 0 121 | }, 122 | }, 123 | 'Armor': { 124 | 'Pink Ribbon': { 125 | 'df': 1 126 | }, 127 | 'Dealmaker': { 128 | 'df': 5, 129 | 'ma': 5 130 | }, 131 | 'Glow Wrist': { 132 | 'df': 2 133 | }, 134 | 'Silver Watch': { 135 | 'df': 1 136 | }, 137 | 'Mannequin': { 138 | 'at': 0 139 | }, 140 | 'Royal Pin': { 141 | 'df': 3, 142 | 'ma': 1 143 | }, 144 | 'Silver Card': { 145 | 'df': 2 146 | }, 147 | 'Twin Ribbon': { 148 | 'df': 3 149 | }, 150 | 'Spike Band': { 151 | 'at': 2, 152 | 'df': 1 153 | }, 154 | 'Chain Mail': { 155 | 'df': 3 156 | }, 157 | 'B.ShotBowtie': { 158 | 'df': 2, 159 | 'ma': 1 160 | }, 161 | 'Tension Bow': { 162 | 'df': 2 163 | }, 164 | 'Sky Mantle': { 165 | 'df': 1, 166 | isUnused: true 167 | }, 168 | 'Frayed Bowtie': { 169 | 'at': 1, 170 | 'df': 1, 171 | 'ma': 1 172 | }, 173 | 'Spike Shackle': { 174 | 'at': 3, 175 | 'df': 1, 176 | isUnused: true 177 | }, 178 | }, 179 | }); -------------------------------------------------------------------------------- /script_res/damage_rby.js: -------------------------------------------------------------------------------- 1 | function CALCULATE_ALL_MOVES_RBY(p1, p2, field) { 2 | p1.stats[AT] = Math.min(999, Math.max(1, getModifiedStat(p1.rawStats[AT], p1.boosts[AT]))); 3 | p1.stats[DF] = Math.min(999, Math.max(1, getModifiedStat(p1.rawStats[DF], p1.boosts[DF]))); 4 | p1.stats[SL] = Math.min(999, Math.max(1, getModifiedStat(p1.rawStats[SL], p1.boosts[SL]))); 5 | p2.stats[AT] = Math.min(999, Math.max(1, getModifiedStat(p2.rawStats[AT], p2.boosts[AT]))); 6 | p2.stats[DF] = Math.min(999, Math.max(1, getModifiedStat(p2.rawStats[DF], p2.boosts[DF]))); 7 | p2.stats[SL] = Math.min(999, Math.max(1, getModifiedStat(p2.rawStats[SL], p2.boosts[SL]))); 8 | var side1 = field.getSide(1); 9 | var side2 = field.getSide(0); 10 | var results = [[],[]]; 11 | for (var i = 0; i < 4; i++) { 12 | results[0][i] = CALCULATE_DAMAGE_RBY(p1, p2, p1.moves[i], side1); 13 | results[1][i] = CALCULATE_DAMAGE_RBY(p2, p1, p2.moves[i], side2); 14 | } 15 | return results; 16 | } 17 | 18 | function CALCULATE_DAMAGE_RBY(attacker, defender, move, field) { 19 | var description = { 20 | "attackerName": attacker.name, 21 | "moveName": move.name, 22 | "defenderName": defender.name 23 | }; 24 | 25 | if (move.bp === 0) { 26 | return {"damage":[0], "description":buildDescription(description)}; 27 | } 28 | 29 | var lv = attacker.level; 30 | if (move.name === "Seismic Toss" || move.name === "Night Shade") { 31 | return {"damage":[lv], "description":buildDescription(description)}; 32 | } 33 | 34 | var typeEffect1 = typeChart[move.type][defender.type1]; 35 | var typeEffect2 = defender.type2 ? typeChart[move.type][defender.type2] : 1; 36 | var typeEffectiveness = typeEffect1 * typeEffect2; 37 | 38 | if (typeEffectiveness === 0) { 39 | return {"damage":[0], "description":buildDescription(description)}; 40 | } 41 | 42 | if (move.hits > 1) { 43 | description.hits = move.hits; 44 | } 45 | 46 | var isPhysical = typeChart[move.type].category === "Physical"; 47 | var attackStat = isPhysical ? AT : SL; 48 | var defenseStat = isPhysical ? DF : SL; 49 | var at = attacker.stats[attackStat]; 50 | var df = defender.stats[defenseStat]; 51 | 52 | if (move.isCrit) { 53 | lv *= 2; 54 | at = attacker.rawStats[attackStat]; 55 | df = defender.rawStats[defenseStat]; 56 | description.isCritical = true; 57 | } else { 58 | if (attacker.boosts[attackStat] !== 0) { 59 | description.attackBoost = attacker.boosts[attackStat]; 60 | } 61 | if (defender.boosts[defenseStat] !== 0) { 62 | description.defenseBoost = defender.boosts[defenseStat]; 63 | } 64 | if (isPhysical && attacker.status === "Burned") { 65 | at = Math.floor(at / 2); 66 | description.isBurned = true; 67 | } 68 | } 69 | 70 | if (move.name === "Explosion" || move.name === "Selfdestruct") { 71 | df = Math.floor(df / 2); 72 | } 73 | 74 | if (!move.isCrit) { 75 | if (isPhysical && field.isReflect) { 76 | df *= 2; 77 | description.isReflect = true; 78 | } else if (!isPhysical && field.isLightScreen) { 79 | df *= 2; 80 | description.isLightScreen = true; 81 | } 82 | } 83 | 84 | if (at > 255 || df > 255) { 85 | at = Math.floor(at / 4) % 256; 86 | df = Math.floor(df / 4) % 256; 87 | } 88 | 89 | var baseDamage = Math.min(997, Math.floor(Math.floor(Math.floor(2 * lv / 5 + 2) * Math.max(1, at) * move.bp / Math.max(1, df)) / 50)) + 2; 90 | if (move.type === attacker.type1 || move.type === attacker.type2) { 91 | baseDamage = Math.floor(baseDamage * 1.5); 92 | } 93 | baseDamage = Math.floor(baseDamage * typeEffectiveness); 94 | // If baseDamage >= 768, don't apply random factor? upokecenter says this, but nobody else does 95 | var damage = []; 96 | for (var i = 217; i <= 255; i++) { 97 | damage[i-217] = Math.floor(baseDamage * i / 255); 98 | } 99 | return {"damage":damage, "description":buildDescription(description)}; 100 | } 101 | -------------------------------------------------------------------------------- /script_res/dark_nb_calc.css: -------------------------------------------------------------------------------- 1 | body, html { 2 | margin:0; 3 | padding:0; 4 | background-color: #10171e; 5 | color : #d4d4d4; 6 | font-family: Open Sans; 7 | } 8 | 9 | textarea, #spreadName{ 10 | background-color: #323232; 11 | color: #d4d4d4; 12 | } 13 | 14 | #switchTheme{ 15 | margin-left : 90px; 16 | width: 100px; 17 | } 18 | 19 | select.decorated option:hover { 20 | box-shadow: 0 0 10px 100px #white inset; 21 | } 22 | 23 | 24 | #wideguard { 25 | display: block; 26 | margin: 0 auto; 27 | padding-bottom: 0.5em; 28 | } 29 | 30 | #notice{ 31 | font-size: 30pt; 32 | color: #e64946; 33 | } 34 | #smallnotice{ 35 | font-size: 15pt; 36 | color: #e64946; 37 | } 38 | 39 | #notice a{ 40 | color: #1e3864; 41 | } 42 | 43 | .header{ 44 | margin:0 0 20px 0; 45 | color: #ffffff !important; 46 | background-color: #323232 !important; 47 | border-bottom: 5px solid #7e4645 !important; 48 | box-shadow:inset 1px 1px 0 rgba(255,255,255,.6),0px 2px 2px rgba(0,0,0,.15); 49 | min-height:50px; 50 | } 51 | 52 | .header a { 53 | color: #fff; 54 | text-decoration: none; 55 | } 56 | 57 | .header-inner { 58 | max-width:960px; 59 | margin:0 auto; 60 | } 61 | 62 | .header-logo { 63 | float: left; 64 | } 65 | 66 | .nav,.nav li,.nav-play,.nav-play li{ 67 | display:block; 68 | list-style:none; 69 | margin:0; 70 | padding:0; 71 | float:left; 72 | } 73 | 74 | .nav{ 75 | padding:15px 6px 15px 6px; 76 | } 77 | 78 | 79 | .button{ 80 | outline:none; 81 | cursor:pointer; 82 | text-align:center; 83 | text-decoration:none; 84 | text-shadow:0 1px 0 rgba(255,255,255,.4); 85 | border-radius:5px; 86 | -webkit-box-shadow:0 1px 2px rgba(0,0,0,.2),inset 0 -1px 2px rgba(255,255,255,1); 87 | -moz-box-shadow:0 1px 2px rgba(0,0,0,.2),inset 0 -1px 2px rgba(255,255,255,1); 88 | box-shadow:0 1px 2px rgba(0,0,0,.2),inset 0 -1px 2px rgba(255,255,255,1); 89 | white-space:nowrap; 90 | color:#222222; 91 | border:solid 1px #AAAAAA; 92 | background:#e3e3e3; 93 | background:-webkit-gradient(linear,left top,left bottom,from(#f6f6f6),to(#e3e3e3)); 94 | background:-moz-linear-gradient(top,#f6f6f6,#e3e3e3); 95 | background:linear-gradient(top,#f6f6f6,#e3e3e3); 96 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6',endColorstr='#e3e3e3'); 97 | } 98 | 99 | .button:hover{ 100 | background:#cfcfcf; 101 | background:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#cfcfcf)); 102 | background:-moz-linear-gradient(top,#f2f2f2,#cfcfcf); 103 | background:linear-gradient(top,#f2f2f2,#cfcfcf); 104 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2f2f2',endColorstr='#cfcfcf'); 105 | border-color:#606060; 106 | } 107 | 108 | .button:active{ 109 | background:-webkit-gradient(linear,left top,left bottom,from(#cfcfcf),to(#f2f2f2)); 110 | background:-moz-linear-gradient(top,#cfcfcf,#f2f2f2); 111 | background:linear-gradient(top,#cfcfcf,#f2f2f2); 112 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cfcfcf',endColorstr='#f2f2f2'); 113 | } 114 | 115 | .wrapper{ 116 | padding:0 1em; 117 | max-width:1138px; 118 | margin:0 auto; 119 | } 120 | 121 | .set-selector { 122 | width: 26em; 123 | } 124 | .panel { 125 | margin: 5px; 126 | background-color: #323232; 127 | border: medium none; 128 | border-radius: 2px; 129 | box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3); 130 | } 131 | .panel-body { 132 | padding: 15px; 133 | } 134 | .panel-heading { 135 | background-color: #323232; 136 | padding: 10px 15px; 137 | border-bottom: 5px solid #7e4645; 138 | border-top-right-radius: 2px; 139 | border-top-left-radius: 2px; 140 | } 141 | 142 | .panel-title { 143 | margin-top: 0; 144 | margin-bottom: 0; 145 | font-size: 15px; 146 | color: #d4d4d4 !important; 147 | } 148 | 149 | select{ 150 | background: #323232 !important; 151 | color: #d4d4d4 !important; 152 | border: #525252 solid 1px !important; 153 | } 154 | 155 | 156 | .banner { 157 | text-align: center; 158 | margin-top: 10px; 159 | } 160 | 161 | .footer { 162 | clear: both; 163 | padding-top: 10px; 164 | text-align: center; 165 | font-size: 0.7em; 166 | } 167 | 168 | h1 { 169 | margin: 0; 170 | font-size: 18px; 171 | } 172 | 173 | h1 a { 174 | color: #fff; 175 | text-decoration: none; 176 | } 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /afd_res/noise.js: -------------------------------------------------------------------------------- 1 | var noise_isrunning = false; 2 | 3 | function run_noise() { 4 | if (noise_isrunning) return; 5 | noise_isrunning = true; 6 | var w = window.innerWidth, h = window.innerHeight; 7 | var h_center = h / 2; 8 | var the_noise = document.createElement('img'), peppino = document.createElement('img'); 9 | var noise_pos = -100, peppino_pos = -100, noise_posy = 0; 10 | var step_loopnum = 0; 11 | the_noise.setAttribute('id', 'thenoise'); 12 | the_noise.setAttribute('src', 'image_res/aprilfoolsday/noisewalk.gif'); 13 | the_noise.setAttribute('style', 'transform: scaleX(-1); position: absolute; left: ' + (w + noise_pos) + 'px; bottom: ' + (h_center) + 'px;'); 14 | document.getElementById('noisechars').appendChild(the_noise); 15 | noise_walk = setInterval(() => { 16 | if (noise_pos >= (w / -2 - 20)) { 17 | step_loopnum++; 18 | noise_pos -= 20; 19 | the_noise.style.left = (w + noise_pos) + 'px'; 20 | if (step_loopnum % 8 == 5) 21 | document.getElementById('noise_walk').play(); 22 | } 23 | else { 24 | clearInterval(noise_walk); 25 | the_noise.setAttribute('src', 'image_res/aprilfoolsday/noiseidle.gif'); 26 | var loopnum = 0, attackframe = 0, attackanim = false, noisehit = false; 27 | peppino_enters = setInterval(() => { 28 | if (loopnum == 30) { 29 | the_noise.setAttribute('src', 'image_res/aprilfoolsday/noisesmile.gif'); 30 | document.getElementById('noise_woag').play(); 31 | } 32 | else if (loopnum == 75) { 33 | document.getElementById('peppino_yell').play(); 34 | } 35 | else if (loopnum == 80) { 36 | the_noise.setAttribute('src', 'image_res/aprilfoolsday/noisestun.gif'); 37 | } 38 | else if (loopnum == 123) { 39 | peppino.setAttribute('id', 'peppino'); 40 | peppino.setAttribute('src', 'image_res/aprilfoolsday/peppinorun.gif'); 41 | peppino.setAttribute('style', 'position: absolute; right: ' + (w + peppino_pos) + 'px; bottom: ' + (h_center) + 'px;'); 42 | document.getElementById('noisechars').appendChild(peppino); 43 | } 44 | else if (loopnum == 128) { 45 | the_noise.setAttribute('src', 'image_res/aprilfoolsday/noisefear.gif'); 46 | document.getElementById('noise_yell').play(); 47 | } 48 | if (loopnum >= 123) { 49 | if (loopnum % 102 == 21) 50 | document.getElementById('peppino_run').play(); 51 | else if (loopnum % 102 == 72) 52 | document.getElementById('peppino_run2').play(); 53 | } 54 | if (peppino.parentNode && peppino_pos > (-w + 40)) { 55 | peppino_pos -= 40; 56 | peppino.style.right = (w + peppino_pos) + 'px'; 57 | if (w + peppino_pos >= w + noise_pos - 20 && w + peppino_pos <= w + noise_pos + 20) { 58 | peppino.setAttribute('src', 'image_res/aprilfoolsday/peppinoattack.gif'); 59 | the_noise.setAttribute('src', 'image_res/aprilfoolsday/noisedies.gif'); 60 | document.getElementById('peppino_hit').play(); 61 | attackanim = true; 62 | noisehit = true; 63 | } 64 | else if (attackframe == 6) { 65 | peppino.setAttribute('src', 'image_res/aprilfoolsday/peppinorun.gif'); 66 | attackframe++; 67 | attackanim = false; 68 | } 69 | } 70 | else if (peppino.parentNode && peppino_pos <= (-w + 40)) { 71 | peppino.remove(); 72 | } 73 | if (noisehit) { 74 | if (h_center + noise_posy <= h && w + noise_pos <= w) { 75 | noise_pos += 60; 76 | noise_posy += 40; 77 | the_noise.style.left = (w + noise_pos) + 'px'; 78 | the_noise.style.bottom = (h_center + noise_posy) + 'px'; 79 | } 80 | else 81 | the_noise.remove(); 82 | } 83 | 84 | if (!peppino.parentNode && !the_noise.parentNode) { 85 | clearInterval(peppino_enters); 86 | noise_isrunning = false; 87 | } 88 | 89 | if (attackanim) attackframe++; 90 | loopnum++; 91 | }, 33); 92 | } 93 | }, 33); 94 | } -------------------------------------------------------------------------------- /script_res/nb_calc_old.css: -------------------------------------------------------------------------------- 1 | /*here are the changes for dark mode */ 2 | 3 | #switchTheme{ 4 | margin-left : 90px; 5 | width: 100px; 6 | } 7 | 8 | body.dark, html.dark { 9 | color: #d4d4d4; 10 | background-color: #10171e; 11 | } 12 | 13 | .dark .panel, .dark .panel-heading { 14 | background-color: #323232; 15 | border-bottom: 5px solid #7e4645; 16 | } 17 | 18 | .dark .header { 19 | color: #ffffff !important; 20 | background-color: #323232 !important; 21 | border-bottom: 5px solid #7e4645 !important; 22 | } 23 | 24 | .dark .btn { 25 | color: #d4d4d4; 26 | background: #323232; 27 | } 28 | 29 | .dark .poke-info input[type="number"] { 30 | background: #323232; 31 | color: #d4d4d4; 32 | border: #525252 solid 1px; 33 | } 34 | .dark .poke-info input:not([type]), .poke-info input[type="text"], .poke-info span :not(.select2-chosen) { 35 | background: #323232; 36 | color: #d4d4d4; 37 | border: #525252 solid 1px; 38 | } 39 | 40 | .dark .select2-drop { 41 | background: #323232; 42 | color: #d4d4d4; 43 | } 44 | 45 | .dark .btn-input:checked + .btn { 46 | color: #fff; 47 | background: #5d5d5d; 48 | } 49 | 50 | .dark .select2-search input { 51 | background: #323232 52 | } 53 | 54 | .dark select { 55 | background: #323232 !important; 56 | color: #d4d4d4 !important; 57 | border: #525252 solid 1px !important; 58 | } 59 | 60 | .dark .select2-container .select2-choice { 61 | color: #f1f1f1!important; 62 | background: #292929 !important; 63 | } 64 | 65 | .dark textarea, .dark #spreadName { 66 | color: #d4d4d4; 67 | border-color: rgb(169, 169, 169); 68 | background-color: #323232; 69 | } 70 | 71 | 72 | .dark a:visited, .dark a:link { 73 | color: #fff; 74 | } 75 | 76 | .dark .onoffswitch-inner:before { 77 | background-color: #323232; 78 | } 79 | 80 | .dark .poke-info .underLimit { 81 | color: #d4d4d4; 82 | } 83 | 84 | /*normal page stuff now */ 85 | 86 | body, html { 87 | margin:0; 88 | padding:0; 89 | background-color: #f3f3f3; 90 | font-family: Open Sans; 91 | } 92 | 93 | 94 | #wideguard { 95 | display: block; 96 | margin: 0 auto; 97 | padding-bottom: 0.5em; 98 | } 99 | 100 | #notice{ 101 | font-size: 30pt; 102 | color: #e64946; 103 | } 104 | #smallnotice{ 105 | font-size: 15pt; 106 | color: #e64946; 107 | } 108 | 109 | #notice a{ 110 | color: #1e3864; 111 | } 112 | 113 | .header{ 114 | margin:0 0 20px 0; 115 | color: #ffffff; 116 | background:#1e3864; 117 | border-bottom: 5px solid #e64946; 118 | box-shadow:inset 1px 1px 0 rgba(255,255,255,.6),0px 2px 2px rgba(0,0,0,.15); 119 | min-height:50px; 120 | } 121 | 122 | .header a { 123 | color: #fff; 124 | text-decoration: none; 125 | } 126 | 127 | .header-inner { 128 | max-width:960px; 129 | margin:0 auto; 130 | } 131 | 132 | .header-logo { 133 | float: left; 134 | } 135 | 136 | .nav,.nav li,.nav-play,.nav-play li{ 137 | display:block; 138 | list-style:none; 139 | margin:0; 140 | padding:0; 141 | float:left; 142 | } 143 | 144 | .nav{ 145 | padding:15px 6px 15px 6px; 146 | } 147 | 148 | 149 | .button{ 150 | outline:none; 151 | cursor:pointer; 152 | text-align:center; 153 | text-decoration:none; 154 | text-shadow:0 1px 0 rgba(255,255,255,.4); 155 | border-radius:5px; 156 | -webkit-box-shadow:0 1px 2px rgba(0,0,0,.2),inset 0 -1px 2px rgba(255,255,255,1); 157 | -moz-box-shadow:0 1px 2px rgba(0,0,0,.2),inset 0 -1px 2px rgba(255,255,255,1); 158 | box-shadow:0 1px 2px rgba(0,0,0,.2),inset 0 -1px 2px rgba(255,255,255,1); 159 | white-space:nowrap; 160 | color:#222222; 161 | border:solid 1px #AAAAAA; 162 | background:#e3e3e3; 163 | background:-webkit-gradient(linear,left top,left bottom,from(#f6f6f6),to(#e3e3e3)); 164 | background:-moz-linear-gradient(top,#f6f6f6,#e3e3e3); 165 | background:linear-gradient(top,#f6f6f6,#e3e3e3); 166 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6',endColorstr='#e3e3e3'); 167 | } 168 | 169 | .button:hover{ 170 | background:#cfcfcf; 171 | background:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#cfcfcf)); 172 | background:-moz-linear-gradient(top,#f2f2f2,#cfcfcf); 173 | background:linear-gradient(top,#f2f2f2,#cfcfcf); 174 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2f2f2',endColorstr='#cfcfcf'); 175 | border-color:#606060; 176 | } 177 | 178 | .button:active{ 179 | background:-webkit-gradient(linear,left top,left bottom,from(#cfcfcf),to(#f2f2f2)); 180 | background:-moz-linear-gradient(top,#cfcfcf,#f2f2f2); 181 | background:linear-gradient(top,#cfcfcf,#f2f2f2); 182 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cfcfcf',endColorstr='#f2f2f2'); 183 | } 184 | 185 | .wrapper{ 186 | padding:0 1em; 187 | max-width:1138px; 188 | margin:0 auto; 189 | } 190 | 191 | .set-selector { 192 | width: 26em; 193 | } 194 | .panel { 195 | margin: 5px; 196 | background-color: #ffffff; 197 | border: medium none; 198 | border-radius: 2px; 199 | box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3); 200 | } 201 | .panel-body { 202 | padding: 15px; 203 | } 204 | .panel-heading { 205 | background-color: #1e3864; 206 | padding: 10px 15px; 207 | border-bottom: 5px solid #e64946; 208 | border-top-right-radius: 2px; 209 | border-top-left-radius: 2px; 210 | } 211 | 212 | .panel-title { 213 | margin-top: 0; 214 | margin-bottom: 0; 215 | font-size: 15px; 216 | color: #fff; 217 | } 218 | 219 | .banner { 220 | text-align: center; 221 | margin-top: 10px; 222 | } 223 | 224 | .footer { 225 | clear: both; 226 | padding-top: 10px; 227 | text-align: center; 228 | font-size: 0.7em; 229 | } 230 | 231 | h1 { 232 | margin: 0; 233 | font-size: 18px; 234 | } 235 | 236 | h1 a { 237 | color: #fff; 238 | text-decoration: none; 239 | } 240 | -------------------------------------------------------------------------------- /afd_res/unused_afd/deltadex.js: -------------------------------------------------------------------------------- 1 | var DELTADEX_CH1 = { 2 | "Rudinn": { 3 | "hp": 120, 4 | "at": 5, 5 | "df": 0, 6 | }, 7 | "Hathy": { 8 | "hp": 150, 9 | "at": 6, 10 | "df": 0, 11 | }, 12 | "Ponman": { 13 | "hp": 140, 14 | "at": 7, 15 | "df": 1, 16 | }, 17 | "Rabbick": { 18 | "hp": 120, 19 | "at": 8, 20 | "df": 1, 21 | }, 22 | "Bloxer": { 23 | "hp": 130, 24 | "at": 9, 25 | "df": 2, 26 | }, 27 | "Jigsawry": { 28 | "hp": 90, 29 | "at": 5, 30 | "df": 0, 31 | }, 32 | "Rudinn Ranger": { 33 | "hp": 170, 34 | "at": 80, 35 | "df": 0, 36 | }, 37 | "Head Hathy": { 38 | "hp": 190, 39 | "at": 8, 40 | "df": 0, 41 | }, 42 | "Lancer (Town)": { 43 | "hp": 540, 44 | "at": 5, 45 | "df": 1, 46 | }, 47 | "Dummy": { 48 | "hp": 450, 49 | "at": 0, 50 | "df": 0, 51 | }, 52 | "C. Round": { 53 | "hp": 10, 54 | "at": 5, 55 | "df": 0, 56 | }, 57 | "K. Round (Field)": { 58 | "hp": 1300, 59 | "at": 7.5, 60 | "df": 3, 61 | }, 62 | "Lancer & Susie": { 63 | "hp": 800, 64 | "at": 7, 65 | "df": 1, 66 | }, 67 | "Lancer": { 68 | "hp": 800, 69 | "at": 7, 70 | "df": 1, 71 | }, 72 | "Susie": { 73 | "hp": 120, 74 | "at": 7, 75 | "df": -5, 76 | }, 77 | "Clover": { 78 | "hp": 270, 79 | "at": 6, 80 | "df": 1, 81 | }, 82 | "Lancer (Castle)": { 83 | "hp": 2400, 84 | "at": 4, 85 | "df": -40, 86 | }, 87 | "K. Round (Castle)": { 88 | "hp": 1300, 89 | "at": 8, 90 | "df": 3, 91 | }, 92 | "Jevil": { 93 | "hp": 3500, 94 | "at": 10, 95 | "df": 5, 96 | }, 97 | "King": { 98 | "hp": 2800, 99 | "at": 8, 100 | "df": 0, 101 | }, 102 | }; 103 | 104 | var DELTADEX_CH2 = { 105 | "Ambyu-Lance": { 106 | "hp": 300, 107 | "at": 8, 108 | "df": 0 109 | }, 110 | "Poppup": { 111 | "hp": 120, 112 | "at": 9, 113 | "df": 0, 114 | }, 115 | "Tasque": { 116 | "hp": 240, 117 | "at": 8, 118 | "df": 0, 119 | }, 120 | "Werewire": { 121 | "hp": 240, 122 | "at": 8, 123 | "df": 0, 124 | }, 125 | "Maus": { 126 | "hp": 120, 127 | "at": 8, 128 | "df": 0, 129 | }, 130 | "Virovirokun": { 131 | "hp": 240, 132 | "at": 8, 133 | "df": 0, 134 | }, 135 | "Swatchling": { 136 | "hp": 300, 137 | "at": 9, 138 | "df": 0, 139 | }, 140 | "Werewerewire": { 141 | "hp": 1753, 142 | "at": 11, 143 | "df": 0, 144 | }, 145 | "Tasque Manager": { 146 | "hp": 1367, 147 | "at": 10, 148 | "df": 0, 149 | }, 150 | "Mauswheel": { 151 | "hp": 1753, 152 | "at": 10, 153 | "df": 0, 154 | }, 155 | "Jigsaw Joe": { 156 | "hp": 1, 157 | "at": 8, 158 | "df": 0, 159 | }, 160 | "Clover": { 161 | "hp": 1500, 162 | "at": 11, 163 | "df": 0, 164 | }, 165 | "Sweet Cap'n Cakes": { 166 | "hp": 120, 167 | "at": 8, 168 | "df": 0, 169 | }, 170 | "Sweet": { 171 | "hp": 120, 172 | "at": 8, 173 | "df": 0, 174 | }, 175 | "Cap'n": { 176 | "hp": 120, 177 | "at": 8, 178 | "df": 0, 179 | }, 180 | "Cakes": { 181 | "hp": 120, 182 | "at": 8, 183 | "df": 0, 184 | }, 185 | "Berdly (Field)": { 186 | "hp": 1985, 187 | "at": 10, 188 | "df": 0, 189 | }, 190 | "Spamton": { 191 | "hp": 600, 192 | "at": 8, 193 | "df": 0, 194 | }, 195 | "Berdly (City)": { 196 | "hp": 900, 197 | "at": 9, 198 | "df": 0, 199 | }, 200 | "Berdly (Weird)": { 201 | "hp": 900, 202 | "at": 6, 203 | "df": 0, 204 | }, 205 | "Rouxls Kaard": { 206 | "hp": 600, 207 | "at": 9, 208 | "df": 0, 209 | }, 210 | "Queen": { 211 | "hp": 1510, 212 | "at": 10, 213 | "df": 0, 214 | }, 215 | "GIGA Queen": { 216 | "hp": 4500, 217 | "at": 7.5, 218 | "df": 0, 219 | }, 220 | "Pipis": { 221 | "hp": 200, 222 | "at": 8, 223 | "df": 0, 224 | }, 225 | "Ms. Pipis": { 226 | "hp": 200, 227 | "at": 8, 228 | "df": 0, 229 | }, 230 | "Spamton NEO": { 231 | "hp": 4809, 232 | "at": 13, 233 | "df": 0, 234 | }, 235 | "Spamton NEO (Weird)": { 236 | "hp": 4809, 237 | "at": 13, 238 | "df": -27, 239 | }, 240 | }; 241 | 242 | var DELTADEX_FUNGANG_CH1 = { 243 | "Kris": { 244 | "hp": 90, 245 | "at": 10, 246 | "df": 2, 247 | }, 248 | "Susie": { 249 | "hp": 110, 250 | "at": 14, 251 | "df": 2, 252 | }, 253 | "Ralsei": { 254 | "hp": 70, 255 | "at": 8, 256 | "df": 2, 257 | }, 258 | }; 259 | 260 | var DELTADEX_FUNGANG_CH2 = { 261 | "Kris": { 262 | "hp": 120, 263 | "at": 12, 264 | "df": 2, 265 | }, 266 | "Susie": { 267 | "hp": 140, 268 | "at": 16, 269 | "df": 2, 270 | }, 271 | "Ralsei": { 272 | "hp": 100, 273 | "at": 10, 274 | "df": 2, 275 | }, 276 | "Noelle": { 277 | "hp": 90, 278 | "at": 3, 279 | "df": 1, 280 | }, 281 | "Thrash Machine": { 282 | "hp": 250, 283 | "at": 10, 284 | "df": 0, 285 | }, 286 | }; -------------------------------------------------------------------------------- /afd_res/old_afd/digisetdex.js: -------------------------------------------------------------------------------- 1 | var SETDEX_SM = { 2 | "Agumon": { 3 | "Default Set": { 4 | "level": 50, 5 | "evs": { 6 | "hp": 0, 7 | "at": 0, 8 | "df": 0, 9 | "sa": 0, 10 | "sd": 0, 11 | "sp": 0 12 | }, 13 | "nature": "Hardy", 14 | "ability": "", 15 | "item": "", 16 | "moves": [ 17 | "Needlespray", 18 | ] 19 | } 20 | }, 21 | "Angemon": { 22 | "Default Set": { 23 | "level": 50, 24 | "evs": { 25 | "hp": 252, 26 | "at": 0, 27 | "df": 4, 28 | "sa": 0, 29 | "sd": 252, 30 | "sp": 0 31 | }, 32 | "nature": "Calm", 33 | "ability": "", 34 | "item": "Sitrus Berry", 35 | "moves": [ 36 | "Needlespray", 37 | ] 38 | } 39 | }, 40 | "Patamon": { 41 | "Default Set": { 42 | "level": 50, 43 | "evs": { 44 | "hp": 252, 45 | "at": 0, 46 | "df": 0, 47 | "sa": 4, 48 | "sd": 252, 49 | "sp": 0 50 | }, 51 | "nature": "Calm", 52 | "ability": "", 53 | "item": "Eviolite", 54 | "moves": [ 55 | "Needlespray", 56 | ] 57 | } 58 | }, 59 | "Togemon": { 60 | "Default Set": { 61 | "level": 50, 62 | "evs": { 63 | "hp": 248, 64 | "at": 252, 65 | "df": 0, 66 | "sa": 0, 67 | "sd": 8, 68 | "sp": 0 69 | }, 70 | "nature": "Adamant", 71 | "ability": "Water Absorb", 72 | "item": "", 73 | "moves": [ 74 | "Needlespray", 75 | ] 76 | } 77 | }, 78 | "Kabuterimon": { 79 | "Default Set": { 80 | "level": 50, 81 | "evs": { 82 | "hp": 4, 83 | "at": 252, 84 | "df": 0, 85 | "sa": 0, 86 | "sd": 0, 87 | "sp": 252 88 | }, 89 | "nature": "Jolly", 90 | "ability": "", 91 | "item": "", 92 | "moves": [ 93 | "Needlespray", 94 | ] 95 | } 96 | }, 97 | "MetalGreymon": { 98 | "Default Set": { 99 | "level": 50, 100 | "evs": { 101 | "hp": 0, 102 | "at": 0, 103 | "df": 0, 104 | "sa": 252, 105 | "sd": 4, 106 | "sp": 252 107 | }, 108 | "nature": "Timid", 109 | "ability": "Blaze", 110 | "item": "Charizardite Y", 111 | "moves": [ 112 | "Needlespray", 113 | ] 114 | }, 115 | }, 116 | "Garudamon": { 117 | "Default Set": { 118 | "level": 50, 119 | "evs": { 120 | "hp": 4, 121 | "at": 252, 122 | "df": 0, 123 | "sa": 0, 124 | "sd": 0, 125 | "sp": 252 126 | }, 127 | "nature": "Adamant", 128 | "ability": "", 129 | "item": "Life Orb", 130 | "moves": [ 131 | "Needlespray", 132 | ] 133 | } 134 | }, 135 | "Hououmon": { 136 | "Default Set": { 137 | "level": 50, 138 | "evs": { 139 | "hp": 252, 140 | "at": 252, 141 | "df": 4, 142 | "sa": 0, 143 | "sd": 0, 144 | "sp": 0 145 | }, 146 | "nature": "Adamant", 147 | "ability": "Pressure", 148 | "item": "", 149 | "moves": [ 150 | "Needlespray", 151 | ] 152 | } 153 | }, 154 | "Garurumon": { 155 | "Default Set": { 156 | "level": 50, 157 | "evs": { 158 | "hp": 4, 159 | "at": 252, 160 | "df": 0, 161 | "sa": 0, 162 | "sd": 0, 163 | "sp": 252 164 | }, 165 | "nature": "Jolly", 166 | "ability": "", 167 | "item": "", 168 | "moves": [ 169 | "Needlespray", 170 | ] 171 | } 172 | }, 173 | 174 | "WereGarurumon": { 175 | "Default Set": { 176 | "level": 50, 177 | "evs": { 178 | "hp": 4, 179 | "at": 252, 180 | "df": 4, 181 | "sa": 0, 182 | "sd": 0, 183 | "sp": 252 184 | }, 185 | "nature": "Adamant", 186 | "ability": "", 187 | "item": "", 188 | "moves": [ 189 | "Needlespray", 190 | ] 191 | } 192 | }, 193 | "ShadowWereGarurumon": { 194 | "Default Set": { 195 | "level": 50, 196 | "evs": { 197 | "hp": 4, 198 | "at": 252, 199 | "df": 4, 200 | "sa": 0, 201 | "sd": 0, 202 | "sp": 252 203 | }, 204 | "nature": "Adamant", 205 | "ability": "", 206 | "item": "", 207 | "moves": [ 208 | "Needlespray", 209 | ] 210 | } 211 | }, 212 | "Sukamon": { 213 |       "Default Set": { 214 |           "level": 50, 215 |           "evs": { 216 |               "hp": 4, 217 |               "at": 0, 218 |               "df": 0, 219 |               "sa": 252, 220 |               "sd": 0, 221 |               "sp": 252 222 |           }, 223 |           "nature": "Modest", 224 |           "ability": "Psychic Surge", 225 |           "item": "", 226 |           "moves": [ 227 | "Needlespray", 228 | ] 229 |       }, 230 | }, 231 | }; 232 | -------------------------------------------------------------------------------- /script_res/nb_calc.css: -------------------------------------------------------------------------------- 1 | /*here are the changes for dark mode */ 2 | 3 | #switchTheme, #switchDex, .dex-change{ 4 | margin-left : 90px; 5 | width: 100px; 6 | } 7 | 8 | body.dark, html.dark { 9 | color: #d4d4d4; 10 | background-color: #101010; 11 | } 12 | 13 | .dark .panel, .dark .panel-heading { 14 | background-color: #192121; 15 | border-bottom: 5px solid #103a52; 16 | } 17 | 18 | /*.dark .panel[id="p1"] { 19 | background-color: #5A1412;*/ 20 | /*background-color: #911e18;*/ 21 | /*border-bottom: 5px solid #103a52; 22 | } 23 | .dark .panel[id="p2"] { 24 | background-color: #200c30;*/ 25 | /*background-color: #471868;*/ 26 | /*border-bottom: 5px solid #103a52; 27 | }*/ 28 | 29 | .dark .header { 30 | color: #ffffff !important; 31 | background-color: #192121 !important; 32 | border-bottom: 5px solid #ce0000 !important; 33 | } 34 | 35 | .dark .btn { 36 | color: #d4d4d4; 37 | background: #31313a; 38 | } 39 | 40 | .dark .poke-info input[type="number"] { 41 | background: #31313a; 42 | color: #d4d4d4; 43 | border: #525252 solid 1px; 44 | } 45 | .dark .poke-info input:not([type]), .dark .poke-info input[type="text"], .poke-info span :not(.select2-chosen) { 46 | background: #31313a; 47 | color: #d4d4d4; 48 | border: #525252 solid 1px; 49 | } 50 | 51 | .dark .select2-drop { 52 | background: #31313a; 53 | color: #d4d4d4; 54 | } 55 | 56 | .dark .btn-input:checked + .btn { 57 | color: #fff; 58 | background: #5d5d5d; 59 | } 60 | 61 | .dark .select2-search input { 62 | background: #31313a 63 | } 64 | 65 | .dark select { 66 | background: #31313a !important; 67 | color: #d4d4d4 !important; 68 | border: #525252 solid 1px !important; 69 | } 70 | 71 | .dark .select2-container .select2-choice { 72 | color: #f1f1f1!important; 73 | background: #31313a !important; 74 | } 75 | 76 | .dark textarea, .dark #spreadName, .dark input.custmod.calc-trigger { 77 | color: #d4d4d4; 78 | border-color: rgb(169, 169, 169); 79 | background-color: #31313a; 80 | } 81 | 82 | 83 | .dark a:visited, .dark a:link { 84 | color: #fff; 85 | } 86 | 87 | .dark .onoffswitch-inner:before { 88 | background-color: #31313a; 89 | } 90 | 91 | .dark .poke-info .underLimit { 92 | color: #d4d4d4; 93 | } 94 | 95 | /*normal page stuff now */ 96 | 97 | body, html { 98 | margin:0; 99 | padding:0; 100 | background-color: #f3f3f3; 101 | font-family: Open Sans; 102 | } 103 | 104 | 105 | #wideguard { 106 | display: block; 107 | margin: 0 auto; 108 | padding-bottom: 0.5em; 109 | } 110 | 111 | #notice{ 112 | font-size: 30pt; 113 | color: #e64946; 114 | } 115 | #smallnotice{ 116 | font-size: 15pt; 117 | color: #e64946; 118 | } 119 | 120 | #notice a{ 121 | color: #1e3864; 122 | } 123 | 124 | .poke-info input:not([type]), .poke-info input[type="text"], .poke-info span :not(.select2-chosen) { 125 | background: #ffffff; 126 | color: #000000; 127 | border: #525252 solid 1px; 128 | } 129 | 130 | .header{ 131 | margin:0 0 20px 0; 132 | color: #ffffff; 133 | background:#293131; 134 | border-bottom: 5px solid #3ab5f7; 135 | box-shadow:inset 1px 1px 0 rgba(255,255,255,.6),0px 2px 2px rgba(0,0,0,.15); 136 | min-height:50px; 137 | } 138 | 139 | .header a { 140 | color: #fff; 141 | text-decoration: none; 142 | } 143 | 144 | .header-inner { 145 | max-width:960px; 146 | margin:0 auto; 147 | } 148 | 149 | .header-logo { 150 | float: left; 151 | } 152 | 153 | .nav,.nav li,.nav-play,.nav-play li{ 154 | display:block; 155 | list-style:none; 156 | margin:0; 157 | padding:0; 158 | float:left; 159 | } 160 | 161 | .nav{ 162 | padding:15px 6px 15px 6px; 163 | } 164 | 165 | 166 | .button{ 167 | outline:none; 168 | cursor:pointer; 169 | text-align:center; 170 | text-decoration:none; 171 | text-shadow:0 1px 0 rgba(255,255,255,.4); 172 | border-radius:5px; 173 | -webkit-box-shadow:0 1px 2px rgba(0,0,0,.2),inset 0 -1px 2px rgba(255,255,255,1); 174 | -moz-box-shadow:0 1px 2px rgba(0,0,0,.2),inset 0 -1px 2px rgba(255,255,255,1); 175 | box-shadow:0 1px 2px rgba(0,0,0,.2),inset 0 -1px 2px rgba(255,255,255,1); 176 | white-space:nowrap; 177 | color:#222222; 178 | border:solid 1px #AAAAAA; 179 | background:#e3e3e3; 180 | background:-webkit-gradient(linear,left top,left bottom,from(#f6f6f6),to(#e3e3e3)); 181 | background:-moz-linear-gradient(top,#f6f6f6,#e3e3e3); 182 | background:linear-gradient(top,#f6f6f6,#e3e3e3); 183 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6',endColorstr='#e3e3e3'); 184 | } 185 | 186 | .button:hover{ 187 | background:#cfcfcf; 188 | background:-webkit-gradient(linear,left top,left bottom,from(#f2f2f2),to(#cfcfcf)); 189 | background:-moz-linear-gradient(top,#f2f2f2,#cfcfcf); 190 | background:linear-gradient(top,#f2f2f2,#cfcfcf); 191 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2f2f2',endColorstr='#cfcfcf'); 192 | border-color:#606060; 193 | } 194 | 195 | .button:active{ 196 | background:-webkit-gradient(linear,left top,left bottom,from(#cfcfcf),to(#f2f2f2)); 197 | background:-moz-linear-gradient(top,#cfcfcf,#f2f2f2); 198 | background:linear-gradient(top,#cfcfcf,#f2f2f2); 199 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cfcfcf',endColorstr='#f2f2f2'); 200 | } 201 | 202 | .wrapper{ 203 | padding:0 1em; 204 | max-width:1350px; 205 | margin:0 auto; 206 | } 207 | 208 | .set-selector { 209 | width: 26em; 210 | } 211 | .panel { 212 | margin: 5px; 213 | background-color: #ffffff; 214 | border: medium none; 215 | border-radius: 2px; 216 | box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3); 217 | } 218 | .panel-body { 219 | padding: 15px; 220 | } 221 | .panel-heading { 222 | background-color: #293131; 223 | padding: 10px 15px; 224 | border-bottom: 5px solid #de2808; 225 | border-top-right-radius: 2px; 226 | border-top-left-radius: 2px; 227 | } 228 | 229 | .panel-title { 230 | margin-top: 0; 231 | margin-bottom: 0; 232 | font-size: 15px; 233 | color: #fff; 234 | } 235 | 236 | .banner { 237 | text-align: center; 238 | margin-top: 10px; 239 | } 240 | 241 | .footer { 242 | clear: both; 243 | padding-top: 10px; 244 | text-align: center; 245 | font-size: 0.7em; 246 | } 247 | 248 | h1 { 249 | margin: 0; 250 | font-size: 18px; 251 | } 252 | 253 | h1 a { 254 | color: #fff; 255 | text-decoration: none; 256 | } 257 | -------------------------------------------------------------------------------- /script_res/damage_gsc.js: -------------------------------------------------------------------------------- 1 | function CALCULATE_ALL_MOVES_GSC(p1, p2, field) { 2 | p1.stats[AT] = Math.min(999, Math.max(1, getModifiedStat(p1.rawStats[AT], p1.boosts[AT]))); 3 | p1.stats[DF] = Math.min(999, Math.max(1, getModifiedStat(p1.rawStats[DF], p1.boosts[DF]))); 4 | p1.stats[SA] = Math.min(999, Math.max(1, getModifiedStat(p1.rawStats[SA], p1.boosts[SA]))); 5 | p1.stats[SD] = Math.min(999, Math.max(1, getModifiedStat(p1.rawStats[SD], p1.boosts[SD]))); 6 | p2.stats[AT] = Math.min(999, Math.max(1, getModifiedStat(p2.rawStats[AT], p2.boosts[AT]))); 7 | p2.stats[DF] = Math.min(999, Math.max(1, getModifiedStat(p2.rawStats[DF], p2.boosts[DF]))); 8 | p2.stats[SA] = Math.min(999, Math.max(1, getModifiedStat(p2.rawStats[SA], p2.boosts[SA]))); 9 | p2.stats[SD] = Math.min(999, Math.max(1, getModifiedStat(p2.rawStats[SD], p2.boosts[SD]))); 10 | var side1 = field.getSide(1); 11 | var side2 = field.getSide(0); 12 | var results = [[],[]]; 13 | for (var i = 0; i < 4; i++) { 14 | results[0][i] = CALCULATE_DAMAGE_GSC(p1, p2, p1.moves[i], side1); 15 | results[1][i] = CALCULATE_DAMAGE_GSC(p2, p1, p2.moves[i], side2); 16 | } 17 | return results; 18 | } 19 | 20 | function CALCULATE_DAMAGE_GSC(attacker, defender, move, field) { 21 | var description = { 22 | "attackerName": attacker.name, 23 | "moveName": move.name, 24 | "defenderName": defender.name 25 | }; 26 | 27 | if (move.bp === 0) { 28 | return {"damage":[0], "description":buildDescription(description)}; 29 | } 30 | 31 | var typeEffect1 = getMoveEffectiveness(move, defender.type1, field.isForesight); 32 | var typeEffect2 = defender.type2 ? getMoveEffectiveness(move, defender.type2, field.isForesight) : 1; 33 | var typeEffectiveness = typeEffect1 * typeEffect2; 34 | 35 | if (typeEffectiveness === 0) { 36 | return {"damage":[0], "description":buildDescription(description)}; 37 | } 38 | 39 | var lv = attacker.level; 40 | if (move.name === "Seismic Toss" || move.name === "Night Shade") { 41 | return {"damage":[lv], "description":buildDescription(description)}; 42 | } 43 | 44 | if (move.hits > 1) { 45 | description.hits = move.hits; 46 | } 47 | 48 | // Flail and Reversal are variable BP and never crit 49 | if (move.name === "Flail" || move.name === "Reversal") { 50 | move.isCrit = false; 51 | var p = Math.floor(48 * attacker.curHP / attacker.maxHP); 52 | move.bp = p <= 1 ? 200 : p <= 4 ? 150 : p <= 9 ? 100 : p <= 16 ? 80 : p <= 32 ? 40 : 20; 53 | description.moveBP = move.bp; 54 | } 55 | 56 | var isPhysical = typeChart[move.type].category === "Physical"; 57 | var attackStat = isPhysical ? AT : SA; 58 | var defenseStat = isPhysical ? DF : SD; 59 | var at = attacker.stats[attackStat]; 60 | var df = defender.stats[defenseStat]; 61 | 62 | // ignore Reflect, Light Screen, stat stages, and burns if attack is a crit and attacker does not have stat stage advantage 63 | var ignoreMods = move.isCrit && attacker.boosts[attackStat] <= defender.boosts[defenseStat]; 64 | 65 | if (ignoreMods) { 66 | at = attacker.rawStats[attackStat]; 67 | df = defender.rawStats[defenseStat]; 68 | } else { 69 | if (attacker.boosts[attackStat] !== 0) { 70 | description.attackBoost = attacker.boosts[attackStat]; 71 | } 72 | if (defender.boosts[defenseStat] !== 0) { 73 | description.defenseBoost = defender.boosts[defenseStat]; 74 | } 75 | if (isPhysical && attacker.status === "Burned") { 76 | at = Math.floor(at / 2); 77 | description.isBurned = true; 78 | } 79 | } 80 | 81 | if (move.name === "Explosion" || move.name === "Self-Destruct") { 82 | df = Math.floor(df / 2); 83 | } 84 | 85 | if (!ignoreMods) { 86 | if (isPhysical && field.isReflect) { 87 | df *= 2; 88 | description.isReflect = true; 89 | } else if (!isPhysical && field.isLightScreen) { 90 | df *= 2; 91 | description.isLightScreen = true; 92 | } 93 | } 94 | 95 | if ((attacker.name === "Pikachu" && attacker.item === "Light Ball" && !isPhysical) || 96 | ((attacker.name === "Cubone" || attacker.name === "Marowak") && attacker.item === "Thick Club" && isPhysical)) { 97 | at *= 2; 98 | description.attackerItem = attacker.item; 99 | } 100 | 101 | if (at > 255 || df > 255) { 102 | at = Math.floor(at / 4) % 256; 103 | df = Math.floor(df / 4) % 256; 104 | } 105 | 106 | if (defender.name === "Ditto" && defender.item === "Metal Powder") { 107 | df = Math.floor(df * 1.5); 108 | description.defenderItem = defender.item; 109 | } 110 | 111 | var baseDamage = Math.floor(Math.floor((Math.floor((2 * lv) / 5 + 2) * Math.max(1, at) * move.bp) / Math.max(1, df)) / 50); 112 | 113 | if (move.isCrit) { 114 | baseDamage *= 2; 115 | description.isCritical = true; 116 | } 117 | 118 | if (getItemBoostType(attacker.item) === move.type) { 119 | baseDamage = Math.floor(baseDamage * 1.1); 120 | description.attackerItem = attacker.item; 121 | } 122 | 123 | baseDamage = Math.min(997, baseDamage) + 2; 124 | 125 | if ((field.weather === "Sun" && move.type === "Fire") || (field.weather === "Rain" && move.type === "Water")) { 126 | baseDamage = Math.floor(baseDamage * 1.5); 127 | description.weather = field.weather; 128 | } else if ((field.weather === "Sun" && move.type === "Water") || (field.weather === "Rain" && (move.type === "Fire" || move.name === "SolarBeam"))) { 129 | baseDamage = Math.floor(baseDamage / 2); 130 | description.weather = field.weather; 131 | } 132 | 133 | if (move.type === attacker.type1 || move.type === attacker.type2) { 134 | baseDamage = Math.floor(baseDamage * 1.5); 135 | } 136 | 137 | baseDamage = Math.floor(baseDamage * typeEffectiveness); 138 | 139 | // Flail and Reversal don't use random factor 140 | if (move.name === "Flail" || move.name === "Reversal") { 141 | return {"damage":[baseDamage], "description":buildDescription(description)}; 142 | } 143 | 144 | var damage = []; 145 | for (var i = 217; i <= 255; i++) { 146 | damage[i-217] = Math.floor(baseDamage * i / 255); 147 | } 148 | return {"damage":damage, "description":buildDescription(description)}; 149 | } 150 | -------------------------------------------------------------------------------- /script_res/damage_xy.js: -------------------------------------------------------------------------------- 1 | /* Damage calculation for the Generation VI games: X, Y, Omega Ruby, and Alpha Sapphire; 2 | * and for the Generation V games: Black, White, Black 2, and White 2 */ 3 | 4 | function CALCULATE_ALL_MOVES_XY(p1, p2, field) { 5 | checkTrace(p1, p2); 6 | checkTrace(p2, p1); 7 | checkAirLock(p1, field); 8 | checkAirLock(p2, field); 9 | checkForecast(p1, field.getWeather()); 10 | checkForecast(p2, field.getWeather()); 11 | checkKlutz(p1); 12 | checkKlutz(p2); 13 | checkEvo(p1, p2); 14 | checkIntimidate(p1, p2); 15 | checkIntimidate(p2, p1); 16 | checkDownload(p1, p2); 17 | checkDownload(p2, p1); 18 | p1.stats[AT] = getModifiedStat(p1.rawStats[AT], p1.boosts[AT]); 19 | p1.stats[DF] = getModifiedStat(p1.rawStats[DF], p1.boosts[DF]); 20 | p1.stats[SA] = getModifiedStat(p1.rawStats[SA], p1.boosts[SA]); 21 | p1.stats[SD] = getModifiedStat(p1.rawStats[SD], p1.boosts[SD]); 22 | p1.stats[SP] = getModifiedStat(p1.rawStats[SP], p1.boosts[SP]); 23 | p1.stats[SP] = getFinalSpeed(p1, field.getWeather(), field.getTailwind(0), field.getSwamp(0), field.getTerrain()); 24 | $(".p1-speed-mods").text(p1.stats[SP]); 25 | p2.stats[AT] = getModifiedStat(p2.rawStats[AT], p2.boosts[AT]); 26 | p2.stats[DF] = getModifiedStat(p2.rawStats[DF], p2.boosts[DF]); 27 | p2.stats[SA] = getModifiedStat(p2.rawStats[SA], p2.boosts[SA]); 28 | p2.stats[SD] = getModifiedStat(p2.rawStats[SD], p2.boosts[SD]); 29 | p2.stats[SP] = getModifiedStat(p2.rawStats[SP], p2.boosts[SP]); 30 | p2.stats[SP] = getFinalSpeed(p2, field.getWeather(), field.getTailwind(1), field.getSwamp(1), field.getTerrain()); 31 | $(".p2-speed-mods").text(p2.stats[SP]); 32 | var side1 = field.getSide(1); 33 | var side2 = field.getSide(0); 34 | checkInfiltrator(p1, side1); 35 | checkInfiltrator(p2, side2); 36 | getWeightMods(p1, p2); 37 | var results = [[],[]]; 38 | for (var i = 0; i < 4; i++) { 39 | results[0][i] = GET_DAMAGE_XY(p1, p2, p1.moves[i], side1); 40 | results[1][i] = GET_DAMAGE_XY(p2, p1, p2.moves[i], side2); 41 | } 42 | return results; 43 | } 44 | 45 | function GET_DAMAGE_XY(attacker, defender, move, field) { 46 | var moveDescName = move.name; 47 | var isMeFirst = false; 48 | 49 | if (move.name == 'Me First') 50 | [move, moveDescName, isMeFirst] = checkMeFirst(move, moveDescName, defender); 51 | 52 | checkMoveTypeChange(move, field, attacker); 53 | 54 | if (move.name == "Nature Power" && attacker.item !== 'Assault Vest') 55 | [move, moveDescName] = NaturePower(move, field, moveDescName); 56 | 57 | attacker_name = attacker.name; 58 | defender_name = defender.name; 59 | var description = { 60 | "attackerName": attacker_name, 61 | "moveName": moveDescName, 62 | "defenderName": defender_name 63 | }; 64 | 65 | addLevelDesc(attacker, defender, description); 66 | 67 | if (move.bp === 0 || move.category === "Status") { 68 | return statusMoves(move, attacker, defender, description); 69 | } 70 | 71 | var defAbility = defender.ability; 72 | [defAbility, description] = abilityIgnore(attacker, move, defAbility, description, defender.item); 73 | 74 | var isCritical = critMove(move, defAbility); 75 | 76 | var ateIzeAbility = ATE_IZE_ABILITIES.indexOf(attacker.ability); //Confirms abilities like Normalize and Pixilate 77 | var ateIzeBoosted; 78 | if (ateIzeAbility !== -1 && ['Hidden Power', 'Weather Ball', 'Natural Gift', 'Judgement', 'Techno Blast'].indexOf(move.name) === -1) { 79 | [move, description, ateIzeBoosted] = ateIzeTypeChange(move, attacker, description); 80 | } 81 | 82 | var typeEffect1 = getMoveEffectiveness(move, defender.type1, defender.type2, description, field.isForesight, attacker.ability == "Scrappy" ? attacker.ability : false, field.isGravity, defender.item, field.weather === "Strong Winds"); 83 | var typeEffect2 = defender.type2 && defender.type2 !== defender.type1 ? getMoveEffectiveness(move, defender.type2, defender.type1, description, field.isForesight, attacker.ability == "Scrappy" ? attacker.ability : false, field.isGravity, defender.item, field.weather === "Strong Winds") : 1; 84 | var typeEffectiveness = typeEffect1 * typeEffect2; 85 | immuneBuildDesc = immunityChecks(move, attacker, defender, field, description, defAbility, typeEffectiveness); 86 | if (immuneBuildDesc !== -1) return immuneBuildDesc; 87 | 88 | getHPInfo(description, defender); 89 | 90 | setDamageBuildDesc = setDamage(move, attacker, defender, description, false, field); 91 | if (setDamageBuildDesc !== -1) return setDamageBuildDesc; 92 | 93 | if (move.hitRange) { 94 | description.hits = move.hits; 95 | } 96 | var turnOrder = attacker.stats[SP] > defender.stats[SP] ? "FIRST" : "LAST"; 97 | var attIsGrounded = pIsGrounded(attacker, field); 98 | var defIsGrounded = pIsGrounded(defender, field); 99 | 100 | //////////////////////////////// 101 | ////////// BASE POWER ////////// 102 | //////////////////////////////// 103 | var basePower; 104 | [basePower, description] = basePowerFunc(move, description, turnOrder, attacker, defender, field, attIsGrounded, defIsGrounded, defAbility); 105 | 106 | var bpMods; 107 | [bpMods, description, move] = calcBPMods(attacker, defender, field, move, description, ateIzeBoosted, basePower, attIsGrounded, defIsGrounded, turnOrder, defAbility, isMeFirst); 108 | 109 | basePower = Math.max(1, pokeRound(basePower * chainMods(bpMods) / 0x1000)); 110 | 111 | //////////////////////////////// 112 | ////////// (SP)ATTACK ////////// 113 | //////////////////////////////// 114 | 115 | var attack; 116 | [attack, description] = calcAttack(move, attacker, defender, description, isCritical, defAbility); 117 | 118 | var atMods; 119 | [atMods, description] = calcAtMods(move, attacker, defAbility, description, field); 120 | 121 | attack = Math.max(1, pokeRound(attack * chainMods(atMods) / 0x1000)); 122 | 123 | //////////////////////////////// 124 | ///////// (SP)DEFENSE ////////// 125 | //////////////////////////////// 126 | var hitsPhysical = move.category === "Physical" || move.dealsPhysicalDamage; 127 | 128 | var defense; 129 | [defense, description] = calcDefense(move, attacker, defender, description, hitsPhysical, isCritical, field); 130 | 131 | var dfMods; 132 | [dfMods, description] = calcDefMods(move, defender, field, description, hitsPhysical, defAbility); 133 | 134 | defense = Math.max(1, pokeRound(defense * chainMods(dfMods) / 0x1000)); 135 | 136 | //////////////////////////////// 137 | //////////// DAMAGE //////////// 138 | //////////////////////////////// 139 | var baseDamage = calcBaseDamage(attacker, basePower, attack, defense); 140 | 141 | 142 | return calcGeneralMods(baseDamage, move, attacker, defender, defAbility, field, description, isCritical, typeEffectiveness, false, hitsPhysical); 143 | } 144 | -------------------------------------------------------------------------------- /script_res/dark_ap_calc.css: -------------------------------------------------------------------------------- 1 | /* general page styling */ 2 | body { 3 | font: 12px Verdana, sans-serif; 4 | background-color: #bbeedd; 5 | padding: 0 1em; 6 | min-width: 100em; 7 | } 8 | fieldset { 9 | float: left; 10 | background-color: #ddffee; 11 | } 12 | legend { 13 | font-weight: bold; 14 | } 15 | th, td { 16 | padding: 0; 17 | } 18 | th { 19 | font-size: 0.8em; 20 | } 21 | 22 | .title-text { 23 | font-weight: bold; 24 | font-size: 1.5em; 25 | height: 50px; 26 | } 27 | .yeartag { 28 | margin-right: 1em; 29 | margin-left: 0.5em; 30 | vertical-align:middle 31 | } 32 | .big-text { 33 | display: inline-block; 34 | font-weight: bold; 35 | font-size: 1.1em; 36 | margin: 0.5em 0; 37 | } 38 | .small-text { 39 | font-size: 0.8em; 40 | } 41 | .panel { 42 | float: left; 43 | display: inline-block; 44 | } 45 | .poke-info { 46 | width: 30em; 47 | } 48 | .field-info { 49 | width: 30em; 50 | } 51 | .generations { 52 | padding-left: 1em; 53 | } 54 | 55 | /* general button styling */ 56 | .btn { 57 | text-align: center; 58 | border: solid 1px #aaaaaa; 59 | padding: 4px 8px; 60 | position: relative; 61 | cursor: pointer; 62 | color : #d4d4d4; 63 | background : #323232; 64 | margin: -1px -3px 0; 65 | display: inline-block; 66 | width: 5em; 67 | border-radius: 8px; 68 | } 69 | .btn-wide { 70 | width: 7em; 71 | } 72 | .btn-xwide { 73 | width: 8em; 74 | } 75 | .btn-xxwide { 76 | width: 9em; 77 | } 78 | .btn-xxxwide { 79 | width: 10em; 80 | } 81 | .btn-small { 82 | width: 4em; 83 | } 84 | .btn-xsmall { 85 | width: 1em; 86 | } 87 | .btn-left { 88 | border-top-right-radius: 0; 89 | border-bottom-right-radius: 0; 90 | } 91 | .btn-right { 92 | border-top-left-radius: 0; 93 | border-bottom-left-radius: 0; 94 | } 95 | .btn-top { 96 | border-bottom-left-radius: 0; 97 | border-bottom-right-radius: 0; 98 | } 99 | .btn-bottom { 100 | border-top-left-radius: 0; 101 | border-top-right-radius: 0; 102 | } 103 | .btn-mid { 104 | border-radius: 0; 105 | } 106 | .btn:hover { 107 | z-index: 10; 108 | border-color: #777777; 109 | background: #656565; 110 | } 111 | .btn-input:checked + .btn { 112 | font-weight: bold; 113 | color: #fff; 114 | background: #5d5d5d; 115 | } 116 | 117 | .select2-results .select2-no-results, .select2-results .select2-searching, .select2-results .select2-selection-limit { 118 | background: #626262; 119 | } 120 | 121 | .btn-input[type="radio"]:checked + .btn { 122 | cursor: default; 123 | } 124 | .btn-input { 125 | display: none; 126 | } 127 | .btn-input:disabled + .btn { 128 | color: #999999; 129 | } 130 | .btn-group { 131 | display: inline-block; 132 | width: 100%; 133 | } 134 | .left { 135 | float: left; 136 | } 137 | .right { 138 | float: right; 139 | } 140 | 141 | .locked-move:checked + .btn { 142 | background: #ffff99; 143 | } 144 | 145 | 146 | /* header */ 147 | .move-result-group { 148 | max-width: 80em; 149 | min-width: 50em; 150 | margin: 1em 0 12em; 151 | } 152 | .move-result-subgroup { 153 | float: left; 154 | width: 50%; 155 | } 156 | .move-result-group .btn { 157 | margin-right: 1em; 158 | } 159 | .main-result-group { 160 | margin: 2em 0 1em; 161 | } 162 | .result-move-header { 163 | font-size: 0.8em; 164 | font-weight: bold; 165 | margin: 0 0 5px; 166 | } 167 | 168 | /* pokemon info */ 169 | .poke-info label { 170 | display: inline-block; 171 | width: 6em; 172 | } 173 | .poke-info input:not([type]), .poke-info input[type="text"], .poke-info span :not(.select2-chosen) { 174 | display: inline-block; 175 | width: 2.5em; 176 | background: #323232; 177 | color: #d4d4d4 ; 178 | border: #525252 solid 1px; 179 | } 180 | .poke-info input[type="number"] { 181 | display: inline-block; 182 | width: 3em; 183 | background: #323232; 184 | color: #d4d4d4 ; 185 | border: #525252 solid 1px; 186 | } 187 | 188 | .info-group { 189 | margin: 1em 0; 190 | } 191 | .set-selector { 192 | width: 28em; 193 | } 194 | .info-selectors select { 195 | width: 15em; 196 | } 197 | select.toxic-counter { 198 | width: 4.5em; 199 | } 200 | .move-selector, .move-bp, .move-type, .move-cat, .move-hits, .move-double, .move-hits2 { 201 | font-size: 0.9em; 202 | } 203 | .move-selector { 204 | width: 9.0em; 205 | } 206 | .poke-info input.move-bp { 207 | width: 2em; 208 | } 209 | .move-cat, .move-hits { 210 | width: 4em; 211 | } 212 | .poke-info .crit-btn { 213 | font-size: 0.8em; 214 | width: 2.5em; 215 | height: 1em; 216 | padding: 3px 3px; 217 | } 218 | .poke-info .x-btn { 219 | font-size: 0.8em; 220 | width: 3.5em; 221 | height: 1em; 222 | padding: 3px 3px; 223 | margin-left: 0.3em; 224 | } 225 | .poke-info .ev-total, .poke-info .ev-left { 226 | font-size: 0.8em; 227 | } 228 | 229 | .poke-info .underLimit { 230 | color: #d4d4d4; 231 | } 232 | 233 | .poke-info .overLimit { 234 | color: #CC0000; 235 | } 236 | 237 | /* field info */ 238 | .field-info .btn { 239 | font-size: 0.8em; 240 | } 241 | 242 | .hide { 243 | display: none; 244 | } 245 | 246 | /* select2 overrides */ 247 | .small-select.select2-container .select2-choice { 248 | font-size: 0.9em; 249 | height: 18px; 250 | line-height: 18px; 251 | } 252 | .small-select.select2-container .select2-choice .select2-arrow b { 253 | background-position: 0 -4px; 254 | } 255 | .small-select.select2-dropdown-open .select2-choice .select2-arrow b { 256 | background-position: -18px -4px; 257 | } 258 | 259 | 260 | 261 | 262 | #autolevel { 263 | float: right; 264 | color: #fff; 265 | text-decoration: none; 266 | } 267 | .onoffswitch { 268 | float: right; 269 | position: relative; width: 70px; 270 | -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none; 271 | display: inline-block; 272 | 273 | } 274 | .onoffswitch-checkbox { 275 | display: none; 276 | } 277 | .onoffswitch-label { 278 | display: block; overflow: hidden; cursor: pointer; 279 | border: 2px solid #999999; border-radius: 8px; 280 | } 281 | .onoffswitch-inner { 282 | display: block; width: 200%; margin-left: -100%; 283 | transition: margin 0.3s ease-in 0s; 284 | } 285 | .onoffswitch-inner:before, .onoffswitch-inner:after { 286 | display: block; float: left; width: 50%; height: 20px; padding: 0; line-height: 20px; 287 | font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold; 288 | box-sizing: border-box; 289 | } 290 | .onoffswitch-inner:before { 291 | content: "50"; 292 | padding-left: 10px; 293 | background-color: #1e3864; color: #fff; 294 | } 295 | .onoffswitch-inner:after { 296 | content: "100"; 297 | padding-right: 10px; 298 | background-color: #F3F3F3; color: #333333; 299 | text-align: right; 300 | } 301 | .onoffswitch-switch { 302 | display: block; width: 10px; margin: 5px; 303 | background: #FFFFFF; 304 | position: absolute; top: 0; bottom: 0; 305 | right: 46px; 306 | border: 2px solid #999999; border-radius: 8px; 307 | transition: all 0.3s ease-in 0s; 308 | } 309 | .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { 310 | margin-left: 0; 311 | } 312 | .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { 313 | right: 0px; 314 | } 315 | -------------------------------------------------------------------------------- /afd_res/old_afd/digidex.js: -------------------------------------------------------------------------------- 1 | var POKEDEX_SM = { 2 | "MetalGreymon": { 3 | "t1": "Fire", 4 | "t2": "Flying", 5 | "bs": { 6 | "hp": 78, 7 | "at": 84, 8 | "df": 78, 9 | "sa": 109, 10 | "sd": 85, 11 | "sp": 100, 12 | "sl": 85 13 | }, 14 | "w": 90.5, 15 | "ab": "Blaze", 16 | "formes": ["MetalGreymon", "MetalGreymon (Virus)", "MetalGreymon (Vaccine)"] 17 | }, 18 | "Agumon": { 19 | "t1": "Fire", 20 | "bs": { 21 | "hp": 39, 22 | "at": 52, 23 | "df": 43, 24 | "sa": 60, 25 | "sd": 50, 26 | "sp": 65, 27 | "sl": 50 28 | }, 29 | "w": 8.5, 30 | "ab": "Blaze" 31 | }, 32 | "Greymon": { 33 | "t1": "Fire", 34 | "bs": { 35 | "hp": 58, 36 | "at": 64, 37 | "df": 58, 38 | "sa": 80, 39 | "sd": 65, 40 | "sp": 80, 41 | "sl": 65 42 | }, 43 | "w": 19.0, 44 | "ab": "Blaze" 45 | }, 46 | "Kabuterimon": { 47 | "t1": "Bug", 48 | "t2": "Fighting", 49 | "bs": { 50 | "hp": 80, 51 | "at": 125, 52 | "df": 75, 53 | "sa": 40, 54 | "sd": 95, 55 | "sp": 85 56 | }, 57 | "w": 54.0, 58 | "formes": ["Kabuterimon", "HerculesKabuterimon"] 59 | }, 60 | "Hououmon": { 61 | "t1": "Fire", 62 | "t2": "Flying", 63 | "bs": { 64 | "hp": 106, 65 | "at": 130, 66 | "df": 90, 67 | "sa": 110, 68 | "sd": 154, 69 | "sp": 90 70 | }, 71 | "w": 199.0 72 | }, 73 | "Tentomon": { 74 | "t1": "Bug", 75 | "t2": "Flying", 76 | "bs": { 77 | "hp": 40, 78 | "at": 20, 79 | "df": 30, 80 | "sa": 40, 81 | "sd": 80, 82 | "sp": 55 83 | }, 84 | "w": 10.8 85 | }, 86 | "Tokomon": { 87 | "t1": "Fairy", 88 | "bs": { 89 | "hp": 35, 90 | "at": 20, 91 | "df": 65, 92 | "sa": 40, 93 | "sd": 65, 94 | "sp": 20 95 | }, 96 | "w": 1.5 97 | }, 98 | "Patamon": { 99 | "t1": "Fairy", 100 | "t2": "Flying", 101 | "bs": { 102 | "hp": 55, 103 | "at": 40, 104 | "df": 85, 105 | "sa": 80, 106 | "sd": 105, 107 | "sp": 40 108 | }, 109 | "w": 3.2 110 | }, 111 | "Yanmamon": { 112 | "t1": "Bug", 113 | "t2": "Flying", 114 | "bs": { 115 | "hp": 65, 116 | "at": 65, 117 | "df": 45, 118 | "sa": 75, 119 | "sd": 45, 120 | "sp": 95 121 | }, 122 | "w": 38.0 123 | }, 124 | "Palmon": { 125 | "t1": "Grass", 126 | "bs": { 127 | "hp": 50, 128 | "at": 85, 129 | "df": 40, 130 | "sa": 85, 131 | "sd": 40, 132 | "sp": 35 133 | }, 134 | "w": 51.3, 135 | "ab": "Sand Veil" 136 | }, 137 | "Togemon": { 138 | "t1": "Grass", 139 | "t2": "Dark", 140 | "bs": { 141 | "hp": 70, 142 | "at": 115, 143 | "df": 60, 144 | "sa": 115, 145 | "sd": 60, 146 | "sp": 55 147 | }, 148 | "w": 77.4, 149 | "ab": "Sand Veil" 150 | }, 151 | "Gatomon": { 152 | "t1": "Normal", 153 | "bs": { 154 | "hp": 50, 155 | "at": 45, 156 | "df": 45, 157 | "sa": 35, 158 | "sd": 35, 159 | "sp": 50 160 | }, 161 | "w": 11.0 162 | }, 163 | "Omnimon": { 164 | "t1": "Normal", 165 | "bs": { 166 | "hp": 120, 167 | "at": 120, 168 | "df": 120, 169 | "sa": 120, 170 | "sd": 120, 171 | "sp": 120 172 | }, 173 | "w": 320.0, 174 | "ab": "Multitype" 175 | }, 176 | "Daipenmon": { 177 | "t1": "Water", 178 | "bs": { 179 | "hp": 53, 180 | "at": 51, 181 | "df": 53, 182 | "sa": 61, 183 | "sd": 56, 184 | "sp": 40 185 | }, 186 | "w": 5.2, 187 | "ab": "Torrent" 188 | }, 189 | "Angewomon": { 190 | "t1": "Grass", 191 | "t2": "Flying", 192 | "bs": { 193 | "hp": 100, 194 | "at": 103, 195 | "df": 75, 196 | "sa": 120, 197 | "sd": 75, 198 | "sp": 127 199 | }, 200 | "w": 5.2, 201 | "ab": "Serene Grace" 202 | }, 203 | "Angemon": { 204 | "t1": "Fairy", 205 | "t2": "Flying", 206 | "bs": { 207 | "hp": 85, 208 | "at": 50, 209 | "df": 95, 210 | "sa": 120, 211 | "sd": 115, 212 | "sp": 80 213 | }, 214 | "w": 38.0 215 | }, 216 | "Terriermon": { 217 | "t1": "Normal", 218 | "bs": { 219 | "hp": 38, 220 | "at": 36, 221 | "df": 38, 222 | "sa": 32, 223 | "sd": 36, 224 | "sp": 57 225 | }, 226 | "w": 5.0 227 | }, 228 | "Biyomon": { 229 | "t1": "Fire", 230 | "t2": "Flying", 231 | "bs": { 232 | "hp": 62, 233 | "at": 73, 234 | "df": 55, 235 | "sa": 56, 236 | "sd": 52, 237 | "sp": 84 238 | }, 239 | "w": 16.0 240 | }, 241 | "Birdramon": { 242 | "t1": "Normal", 243 | "t2": "Flying", 244 | "bs": { 245 | "hp": 45, 246 | "at": 50, 247 | "df": 43, 248 | "sa": 40, 249 | "sd": 38, 250 | "sp": 62 251 | }, 252 | "w": 1.7 253 | }, 254 | "MetalGreymon (Virus)": { 255 | "t1": "Fire", 256 | "t2": "Dragon", 257 | "bs": { 258 | "hp": 78, 259 | "at": 130, 260 | "df": 111, 261 | "sa": 130, 262 | "sd": 85, 263 | "sp": 100 264 | }, 265 | "w": 110.5, 266 | "ab": "Tough Claws", 267 | "isAlternateForme": true 268 | }, 269 | "MetalGreymon (Vaccine)": { 270 | "t1": "Fire", 271 | "t2": "Flying", 272 | "bs": { 273 | "hp": 78, 274 | "at": 104, 275 | "df": 78, 276 | "sa": 159, 277 | "sd": 115, 278 | "sp": 100 279 | }, 280 | "w": 100.5, 281 | "ab": "Drought", 282 | "isAlternateForme": true 283 | }, 284 | "HerculesKabuterimon": { 285 | "t1": "Bug", 286 | "t2": "Fighting", 287 | "bs": { 288 | "hp": 80, 289 | "at": 185, 290 | "df": 115, 291 | "sa": 40, 292 | "sd": 105, 293 | "sp": 75 294 | }, 295 | "w": 62.5, 296 | "ab": "Skill Link", 297 | "isAlternateForme": true 298 | }, 299 | "Garudamon": { 300 | "t1": "Fire", 301 | "t2": "Flying", 302 | "bs": { 303 | "hp": 78, 304 | "at": 81, 305 | "df": 71, 306 | "sa": 74, 307 | "sd": 69, 308 | "sp": 126 309 | }, 310 | "w": 24.5 311 | }, 312 | "Gabumon": { 313 | "t1": "Rock", 314 | "bs": { 315 | "hp": 45, 316 | "at": 65, 317 | "df": 40, 318 | "sa": 30, 319 | "sd": 40, 320 | "sp": 60 321 | }, 322 | "w": 9.2 323 | }, 324 | "Garurumon": { 325 | "t1": "Rock", 326 | "bs": { 327 | "hp": 75, 328 | "at": 115, 329 | "df": 65, 330 | "sa": 55, 331 | "sd": 65, 332 | "sp": 112 333 | }, 334 | "w": 25.0 335 | }, 336 | "WereGarurumon": { 337 | "t1": "Rock", 338 | "bs": { 339 | "hp": 85, 340 | "at": 115, 341 | "df": 75, 342 | "sa": 55, 343 | "sd": 75, 344 | "sp": 82 345 | }, 346 | "w": 25.0 347 | }, 348 | "Sukamon": { 349 | "t1": "Psychic", 350 | "t2": "Fairy", 351 | "bs": { 352 | "hp": 70, 353 | "at": 85, 354 | "df": 75, 355 | "sa": 130, 356 | "sd": 115, 357 | "sp": 95 358 | }, 359 | "ab": "Psychic Surge", 360 | "w": 18.6, 361 | }, 362 | "ShadowWereGarurumon": { 363 | "t1": "Rock", 364 | "bs": { 365 | "hp": 75, 366 | "at": 117, 367 | "df": 65, 368 | "sa": 55, 369 | "sd": 65, 370 | "sp": 110 371 | }, 372 | "w": 25.0, 373 | "ab": "Tough Claws", 374 | }, 375 | 376 | }; 377 | -------------------------------------------------------------------------------- /legacy_scripts/damage_SM-SS.js: -------------------------------------------------------------------------------- 1 | /* Damage calculation for the Generation VIII games: Sword, Shield, Isle of Armor, and Crown Tundra; 2 | * and for the Generation VII games: Sun, Moon, Ultra Sun, and Ultra Moon*/ 3 | 4 | function CALCULATE_ALL_MOVES_SS(p1, p2, field) { 5 | checkTrace(p1, p2); 6 | checkTrace(p2, p1); 7 | checkNeutralGas(p1, p2, field.getNeutralGas()); 8 | checkAirLock(p1, field); 9 | checkAirLock(p2, field); 10 | checkForecast(p1, field.getWeather()); 11 | checkForecast(p2, field.getWeather()); 12 | checkMimicry(p1, field.getTerrain()); 13 | checkMimicry(p2, field.getTerrain()); 14 | checkKlutz(p1); 15 | checkKlutz(p2); 16 | checkEvo(p1, p2); 17 | checkSeeds(p1, field.getTerrain()); 18 | checkSeeds(p2, field.getTerrain()); 19 | checkSwordShield(p1); 20 | checkSwordShield(p2); 21 | checkIntimidate(p1, p2); 22 | checkIntimidate(p2, p1); 23 | p1.stats[DF] = getModifiedStat(p1.rawStats[DF], p1.boosts[DF]); 24 | p1.stats[SD] = getModifiedStat(p1.rawStats[SD], p1.boosts[SD]); 25 | p1.stats[SP] = getFinalSpeed(p1, field.getWeather(), field.getTerrain(), field.getTailwind(0)); 26 | $(".p1-speed-mods").text(p1.stats[SP]); 27 | p2.stats[DF] = getModifiedStat(p2.rawStats[DF], p2.boosts[DF]); 28 | p2.stats[SD] = getModifiedStat(p2.rawStats[SD], p2.boosts[SD]); 29 | p2.stats[SP] = getFinalSpeed(p2, field.getWeather(), field.getTerrain(), field.getTailwind(1)); 30 | $(".p2-speed-mods").text(p2.stats[SP]); 31 | checkDownload(p1, p2); 32 | checkDownload(p2, p1); 33 | p1.stats[AT] = getModifiedStat(p1.rawStats[AT], p1.boosts[AT]); 34 | p1.stats[SA] = getModifiedStat(p1.rawStats[SA], p1.boosts[SA]); 35 | p2.stats[AT] = getModifiedStat(p2.rawStats[AT], p2.boosts[AT]); 36 | p2.stats[SA] = getModifiedStat(p2.rawStats[SA], p2.boosts[SA]); 37 | var side1 = field.getSide(1); 38 | var side2 = field.getSide(0); 39 | checkInfiltrator(p1, side1); 40 | checkInfiltrator(p2, side2); 41 | getWeightMods(p1, p2); 42 | var results = [[],[]]; 43 | for (var i = 0; i < 4; i++) { 44 | results[0][i] = GET_DAMAGE_SS(p1, p2, p1.moves[i], side1); 45 | results[1][i] = GET_DAMAGE_SS(p2, p1, p2.moves[i], side2); 46 | } 47 | return results; 48 | } 49 | 50 | function GET_DAMAGE_SS(attacker, defender, move, field) { 51 | var moveDescName = move.name; 52 | var isQuarteredByProtect = false; 53 | 54 | checkMoveTypeChange(move, field, attacker); 55 | checkConditionalPriority(move, field.terrain); 56 | 57 | if (attacker.isDynamax) 58 | [move, isQuarteredByProtect, moveDescName] = MaxMoves(move, attacker, isQuarteredByProtect, moveDescName, field); 59 | 60 | if (move.name == "Nature Power") 61 | [move, moveDescName] = NaturePower(move, field, moveDescName); 62 | 63 | if (move.isZ || move.isSignatureZ) 64 | [move, isQuarteredByProtect, moveDescName] = ZMoves(move, field, attacker, isQuarteredByProtect, moveDescName); 65 | 66 | attacker_name = attacker.name; 67 | if (attacker_name && attacker_name.includes("-Gmax")) attacker_name = attacker_name.substring(0, attacker_name.indexOf('-Gmax')); 68 | defender_name = defender.name; 69 | if (defender_name && defender_name.includes("-Gmax")) defender_name = defender_name.substring(0, defender_name.indexOf('-Gmax')); 70 | var description = { 71 | "attackerName": attacker_name, 72 | "moveName": moveDescName, 73 | "defenderName": defender_name 74 | }; 75 | 76 | if (move.bp === 0 || move.category === "Status") { 77 | return statusMoves(move, attacker, defender, description); 78 | } 79 | 80 | var defAbility = defender.ability; 81 | [defAbility, description] = abilityIgnore(attacker, move, defAbility, description); 82 | 83 | var isCritical = critMove(move, defAbility); 84 | 85 | if (move.name == "Aura Wheel" && attacker.name == "Morpeko-Hangry") { 86 | move.type = AuraWheel(move, attacker); 87 | } 88 | 89 | var ateIzeAbility = ATE_IZE_ABILITIES.indexOf(attacker.ability); //Confirms abilities like Normalize and Pixilate but not Liquid Voice 90 | var ateIzeBoosted; 91 | if (!move.isZ && (ateIzeAbility !== -1 || attacker.ability == "Liquid Voice") 92 | && (gen <= 4 || ['Hidden Power', 'Weather Ball', 'Natural Gift', 'Judgement', 'Techno Blast', 'Revelation Dance', 'Multi-Attack', 'Terrain Pulse'].indexOf(move.name) === -1)) { 93 | [move, description, ateIzeBoosted] = ateIzeTypeChange(move, attacker, description); 94 | } 95 | 96 | var typeEffect1 = getMoveEffectiveness(move, defender.type1, defender.type2, attacker.ability === "Scrappy" || field.isForesight, field.isGravity, defender.item, field.weather === "Strong Winds"); 97 | var typeEffect2 = defender.type2 ? getMoveEffectiveness(move, defender.type2, defender.type1, attacker.ability === "Scrappy" || field.isForesight, field.isGravity, defender.item, field.weather === "Strong Winds") : 1; 98 | var typeEffectiveness = typeEffect1 * typeEffect2; 99 | immuneBuildDesc = immunityChecks(move, attacker, defender, field, description, defAbility, typeEffectiveness); 100 | if (immuneBuildDesc !== -1) return immuneBuildDesc; 101 | 102 | description.HPEVs = defender.HPEVs + " HP"; 103 | 104 | setDamageBuildDesc = setDamage(move, attacker, defender, description, isQuarteredByProtect); 105 | if (setDamageBuildDesc !== -1) return setDamageBuildDesc; 106 | 107 | if (move.hits > 1) { 108 | description.hits = move.hits; 109 | } 110 | var turnOrder = attacker.stats[SP] > defender.stats[SP] ? "FIRST" : "LAST"; 111 | var attIsGrounded = pIsGrounded(attacker, field); 112 | var defIsGrounded = pIsGrounded(defender, field); 113 | 114 | //////////////////////////////// 115 | ////////// BASE POWER ////////// 116 | //////////////////////////////// 117 | var basePower; 118 | [basePower, description] = basePowerFunc(move, description, turnOrder, attacker, defender, field, attIsGrounded, defIsGrounded, defAbility); 119 | 120 | //BP Modifiers are where physical and special are first checked for so this is as late as this check can go! (Contact as well) 121 | if (usesPhysicalAttack(attacker, defender, move)) { 122 | move.category = "Physical"; 123 | if (move.name === "Shell Side Arm") 124 | move.makesContact = true; 125 | } 126 | var bpMods; 127 | [bpMods, description, move] = calcBPMods(attacker, defender, field, move, description, ateIzeBoosted, basePower, attIsGrounded, defIsGrounded, turnOrder, defAbility); 128 | 129 | basePower = Math.max(1, pokeRound(basePower * chainMods(bpMods) / 0x1000)); 130 | 131 | //////////////////////////////// 132 | ////////// (SP)ATTACK ////////// 133 | //////////////////////////////// 134 | 135 | var attack; 136 | [attack, description] = calcAttack(move, attacker, defender, description, isCritical, defAbility); 137 | 138 | var atMods; 139 | [atMods, description] = calcAtMods(move, attacker, defAbility, description, field); 140 | 141 | attack = Math.max(1, pokeRound(attack * chainMods(atMods) / 0x1000)); 142 | 143 | //////////////////////////////// 144 | ///////// (SP)DEFENSE ////////// 145 | //////////////////////////////// 146 | var hitsPhysical = move.category === "Physical" || move.dealsPhysicalDamage; 147 | 148 | var defense; 149 | [defense, description] = calcDefense(move, attacker, defender, description, hitsPhysical, isCritical, field); 150 | 151 | var dfMods; 152 | [dfMods, description] = calcDefMods(move, defender, field, description, hitsPhysical, defAbility); 153 | 154 | defense = Math.max(1, pokeRound(defense * chainMods(dfMods) / 0x1000)); 155 | 156 | //////////////////////////////// 157 | //////////// DAMAGE //////////// 158 | //////////////////////////////// 159 | var baseDamage = calcBaseDamage(attacker, basePower, attack, defense); 160 | 161 | 162 | return calcGeneralMods(baseDamage, move, attacker, defender, defAbility, field, description, isCritical, typeEffectiveness, isQuarteredByProtect); 163 | } -------------------------------------------------------------------------------- /legacy_scripts/setdex_vgc2022.js: -------------------------------------------------------------------------------- 1 | var SETDEX_VGC2022 = { 2 | "Kyogre": { 3 | "LO Set": { 4 | "level": 50, 5 | "evs": { 6 | "hp": 4, 7 | "at": 0, 8 | "df": 0, 9 | "sa": 252, 10 | "sd": 0, 11 | "sp": 252 12 | }, 13 | "ivs": { 14 | "at": 0 15 | }, 16 | "nature": "Modest", 17 | "item": "Life Orb", 18 | "moves": [ 19 | "Water Spout", 20 | "Origin Pulse", 21 | "Thunder", 22 | "Ice Beam" 23 | ] 24 | }, 25 | }, 26 | "Groudon": { 27 | "Chongjun SLC Champ AV Don": { 28 | "level": 50, 29 | "evs": { 30 | "hp": 252, 31 | "at": 156, 32 | "df": 4, 33 | "sa": 0, 34 | "sd": 60, 35 | "sp": 36 36 | }, 37 | "nature": "Adamant", 38 | "ability": "Drought", 39 | "item": "Assault Vest", 40 | "moves": [ 41 | "Precipice Blades", 42 | "Fire Punch", 43 | "Stone Edge", 44 | "Heavy Slam" 45 | ] 46 | }, 47 | }, 48 | "Reshiram": { 49 | "Serapis' Indy Finalist AV Reshiram": { 50 | "level": 50, 51 | "evs": { 52 | "hp": 252, 53 | "at": 0, 54 | "df": 4, 55 | "sa": 252, 56 | "sd": 0, 57 | "sp": 0 58 | }, 59 | "ivs": { 60 | "at": 0, 61 | "sp": 5, 62 | }, 63 | "nature": "Modest", 64 | "item": "Assault Vest", 65 | "moves": [ 66 | "Blue Flare", 67 | "Draco Meteor", 68 | "Earth Power", 69 | "Solar Beam" 70 | ] 71 | }, 72 | }, 73 | "Calyrex-Ice Rider": { 74 | "Babiri Set": { 75 | "level": 50, 76 | "evs": { 77 | "hp": 252, 78 | "at": 252, 79 | "df": 0, 80 | "sa": 0, 81 | "sd": 4, 82 | "sp": 0 83 | }, 84 | "ivs": { 85 | "sp": 0 86 | }, 87 | "nature": "Brave", 88 | "item": "Babiri Berry", 89 | "moves": [ 90 | "Glacial Lance", 91 | "High Horsepower", 92 | "Seed Bomb", 93 | "Trick Room" 94 | ] 95 | }, 96 | }, 97 | "Calyrex-Shadow Rider": { 98 | "Support Sash Set": { 99 | "level": 50, 100 | "evs": { 101 | "hp": 4, 102 | "at": 0, 103 | "df": 0, 104 | "sa": 252, 105 | "sd": 0, 106 | "sp": 252 107 | }, 108 | "ivs": { 109 | "at": 0 110 | }, 111 | "nature": "Timid", 112 | "item": "Focus Sash", 113 | "moves": [ 114 | "Astral Barrage", 115 | "Psyshock", 116 | "Snarl", 117 | "Will-O-Wisp" 118 | ] 119 | }, 120 | }, 121 | "Charizard": { 122 | "ChartiZard": { 123 | "level": 50, 124 | "evs": { 125 | "hp": 4, 126 | "at": 0, 127 | "df": 0, 128 | "sa": 252, 129 | "sd": 0, 130 | "sp": 252 131 | }, 132 | "ivs": { 133 | "at": 0 134 | }, 135 | "nature": "Timid", 136 | "ability": "Solar Power", 137 | "item": "Charti Berry", 138 | "moves": [ 139 | "Heat Wave", 140 | "Air Slash", 141 | "Ancient Power", 142 | "Blast Burn" 143 | ] 144 | }, 145 | }, 146 | "Regieleki": { 147 | "Special Sash Set": { 148 | "level": 50, 149 | "evs": { 150 | "hp": 4, 151 | "at": 0, 152 | "df": 0, 153 | "sa": 252, 154 | "sd": 0, 155 | "sp": 252 156 | }, 157 | "ivs": { 158 | "at": 0, 159 | }, 160 | "nature": "Timid", 161 | "ability": "Transistor", 162 | "item": "Focus Sash", 163 | "moves": [ 164 | "Thunderbolt", 165 | "Electroweb", 166 | "Volt Switch", 167 | "Thunder" 168 | ] 169 | }, 170 | "Physical LO Eleki": { 171 | "level": 50, 172 | "evs": { 173 | "hp": 4, 174 | "at": 252, 175 | "df": 0, 176 | "sa": 0, 177 | "sd": 0, 178 | "sp": 252 179 | }, 180 | "nature": "Naughty", 181 | "item": "Life Orb", 182 | "moves": [ 183 | "Wild Charge", 184 | "Bounce", 185 | "Assurance", 186 | "Volt Switch" 187 | ] 188 | }, 189 | "Tamtam's AV Eleki": { 190 | "level": 50, 191 | "evs": { 192 | "hp": 20, 193 | "at": 252, 194 | "df": 44, 195 | "sa": 0, 196 | "sd": 92, 197 | "sp": 100 198 | }, 199 | "nature": "Jolly", 200 | "item": "Assault Vest", 201 | "moves": [ 202 | "Wild Charge", 203 | "Bounce", 204 | "Assurance", 205 | "Electroweb" 206 | ] 207 | }, 208 | }, 209 | "Gastrodon": { 210 | "2022 Bulky Gastrodon": { 211 | "level": 50, 212 | "evs": { 213 | "hp": 180, 214 | "at": 0, 215 | "df": 188, 216 | "sa": 0, 217 | "sd": 140, 218 | "sp": 0 219 | }, 220 | "ivs": { 221 | "at": 0, 222 | }, 223 | "nature": "Bold", 224 | "ability": "Storm Drain", 225 | "item": "Leftovers", 226 | "moves": [ 227 | "Earth Power", 228 | "Ice Beam", 229 | "Yawn", 230 | "Protect" 231 | ] 232 | }, 233 | 234 | }, 235 | "Tapu Fini": { 236 | "Serapis' Indy Support Fini": { 237 | "level": 50, 238 | "evs": { 239 | "hp": 244, 240 | "at": 0, 241 | "df": 228, 242 | "sa": 0, 243 | "sd": 36, 244 | "sp": 0 245 | }, 246 | "ivs": { 247 | "at": 0, 248 | }, 249 | "nature": "Calm", 250 | "ability": "Misty Surge", 251 | "item": "Leftovers", 252 | "moves": [ 253 | "Nature's Madness", 254 | "Moonblast", 255 | "Mist", 256 | "Heal Pulse" 257 | ] 258 | }, 259 | 260 | }, 261 | "Shedinja": { 262 | "Series 12 Set": { 263 | "level": 50, 264 | "evs": { 265 | "hp": 0, 266 | "at": 252, 267 | "df": 0, 268 | "sa": 4, 269 | "sd": 0, 270 | "sp": 252 271 | }, 272 | "ivs": { 273 | "df": 0, 274 | "sd": 0 275 | }, 276 | "nature": "Lonely", 277 | "ability": "Wonder Guard", 278 | "item": "Safety Goggles", 279 | "moves": [ 280 | "Shadow Sneak", 281 | "Ally Switch", 282 | "Endure", 283 | "Poltergeist" 284 | ] 285 | }, 286 | 287 | }, 288 | } -------------------------------------------------------------------------------- /script_res/switch_mode.js: -------------------------------------------------------------------------------- 1 | //LIGHT AND DARK THEMES 2 | // Load theme according to localStorage 3 | if (localStorage.getItem("theme") == "dark" || (localStorage.getItem("theme") != "light" && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches)){ 4 | $("#switchTheme").html("Light theme"); 5 | $("#switchTheme").val("light"); 6 | loadTheme("dark"); 7 | }else{ 8 | $("#switchTheme").val("dark"); 9 | loadTheme("light"); 10 | } 11 | //NATIONAL DEX TOGGLING 12 | // Load dex according to localStorage 13 | if (localStorage.getItem("dex") == "natdex") { 14 | $("#switchDex").prop("checked", true); 15 | $("#switchDex").val("vgcdex"); 16 | //loadDex("natdex"); Don't load when starting, it'll be easier if ap_calc handles it by itself 17 | } else { 18 | $("#switchDex").val("natdex"); 19 | //loadDex("vgcdex"); Don't load when starting, it'll be easier if ap_calc handles it by itself 20 | } 21 | 22 | //LEVEL TOGGLING 23 | //Load the leveling system according to localStorage 24 | if (localStorage.getItem("level") == true) { 25 | $("#douswitch").prop("checked", false); 26 | } 27 | 28 | //GEN TOGGLING 29 | //Load the generation according to localStorage 30 | //see function getGen() in ap_calc.js 31 | var isCustomMods = false; 32 | var confirmCustomMods = false; 33 | 34 | $(function(){ 35 | 36 | $("#switchTheme").on("click", function(){ 37 | if($(this).val() == "dark"){ 38 | $(this).html("Light theme"); 39 | this.value = "light"; 40 | // We load the dark theme 41 | loadTheme("dark"); 42 | localStorage.setItem("theme", "dark"); 43 | }else{ 44 | $(this).html("Dark theme"); 45 | this.value = "dark"; 46 | // We load the light theme 47 | loadTheme("light"); 48 | localStorage.setItem("theme", "light"); 49 | } 50 | loadSVColors(this.value); // 51 | }); 52 | 53 | $("#switchDex").on("click", function () { 54 | if ($(this).val() == "natdex") { 55 | this.value = "vgcdex"; 56 | // We load the natdex 57 | loadDex("natdex"); 58 | localStorage.setItem("dex", "natdex"); 59 | } else { 60 | this.value = "natdex"; 61 | // We load the vgcdex 62 | loadDex("vgcdex"); 63 | localStorage.setItem("dex", "vgcdex"); 64 | } 65 | }); 66 | 67 | $("#douswitch").on("click", function () { 68 | if (!$(this).is(":checked")) { 69 | localStorage.setItem("level", true); 70 | } 71 | else { 72 | localStorage.setItem("level", false); 73 | } 74 | }); 75 | 76 | //see $(".gen").change(function ()) in ap_calc.js for changing gen value in localStorage 77 | 78 | $(".set-toggle").on("click", function () { 79 | loadSets("#" + $(this).closest(".poke-info").prop("id")); 80 | }); 81 | 82 | //GEN 7 SET TEMP 83 | $("#gen7sets").on("click", function () { 84 | if ($(this).is(":checked")) { 85 | COMPONENTS[7][0] = SETDEX_TT2019; 86 | tempSetName = "Abomasnow (Default Set)"; 87 | } 88 | else { 89 | COMPONENTS[7][0] = SETDEX_GEN7; 90 | tempSetName = "Abomasnow (Mega Hard TR)"; //Yes tempSetName is lazy but it's only temporary so it's fine 91 | } 92 | loadSetdexScript(); 93 | if (!$("#p1" + " .set-toggle").prop("checked")) 94 | loadPreset("#p1", tempSetName); 95 | if (!$("#p2" + " .set-toggle").prop("checked")) 96 | loadPreset("#p2", tempSetName); 97 | }); 98 | 99 | $("#toggleCustMods").click(function () { 100 | if (!confirmCustomMods) { 101 | if (confirm("This feature is more technical and is intended for testing mechanics. Continue?")) { 102 | confirmCustomMods = true; 103 | toggleCustomModifiers($(this).is(":checked")); 104 | } 105 | else { 106 | $(this).prop("checked", false); 107 | } 108 | } 109 | else { 110 | toggleCustomModifiers($(this).is(":checked")); 111 | } 112 | }); 113 | 114 | }) 115 | 116 | function toggleCustomModifiers(custModsOn) { 117 | if (custModsOn) { 118 | $(".custom-mods-group").show(); 119 | isCustomMods = true; 120 | } 121 | else { 122 | $(".custom-mods-group").hide(); 123 | isCustomMods = false; 124 | } 125 | if (!$.isEmptyObject(mechanicsTests)) { 126 | calculate(); 127 | } 128 | } 129 | 130 | function loadTheme(color){ 131 | $('body').removeClass(); 132 | $('body').addClass(color); 133 | } 134 | 135 | function loadSVColors(theme) { // 136 | if (gen === 9) { // 137 | if (theme === "light") { // 138 | document.querySelector('.dark .panel[id="p1"]').style.backgroundColor = '#380c0a'; // 139 | document.querySelector('.dark .panel[id="p2"]').style.backgroundColor = '#200c30'; // 140 | document.querySelector('.dark .panel[id="field-panel"]').style.backgroundColor = '#003030'; // 141 | } // 142 | else { // 143 | document.querySelector('.light .panel[id="p1"]').style.backgroundColor = '#fad2d2'; // 144 | document.querySelector('.light .panel[id="p2"]').style.backgroundColor = '#e8d6f5'; // 145 | document.querySelector('.light .panel[id="field-panel"]').style.backgroundColor = '#c8e0f0'; // 146 | } // 147 | } // 148 | else { // 149 | if (theme === "light") { // 150 | document.querySelector('.dark .panel[id="p1"]').style.backgroundColor = '#192121'; // 151 | document.querySelector('.dark .panel[id="p2"]').style.backgroundColor = '#192121'; // 152 | document.querySelector('.dark .panel[id="field-panel"]').style.backgroundColor = '#192121'; // 153 | } // 154 | else { // 155 | document.querySelector('.light .panel[id="p1"]').style.backgroundColor = '#ffffff'; // 156 | document.querySelector('.light .panel[id="p2"]').style.backgroundColor = '#ffffff'; // 157 | document.querySelector('.light .panel[id="field-panel"]').style.backgroundColor = '#ffffff'; // 158 | } // 159 | } // 160 | } // 161 | 162 | function loadDex(dexMode) { 163 | if (dexMode === "natdex") { 164 | if (gen === 9) { 165 | pokedex = POKEDEX_SV_NATDEX; 166 | moves = MOVES_SV_NATDEX; 167 | items = ITEMS_SV_NATDEX; 168 | } 169 | else { 170 | pokedex = POKEDEX_SS_NATDEX; 171 | moves = MOVES_SS_NATDEX; 172 | items = ITEMS_SS_NATDEX; 173 | } 174 | } 175 | else { 176 | if (gen === 9) { 177 | pokedex = POKEDEX_SV; 178 | moves = MOVES_SV; 179 | items = ITEMS_SV; 180 | } 181 | else { 182 | pokedex = POKEDEX_SS; 183 | moves = MOVES_SS; 184 | items = ITEMS_SS; 185 | } 186 | } 187 | 188 | clearField(); 189 | $(".gen-specific.g" + gen).show(); 190 | $(".gen-specific").not(".g" + gen).hide(); 191 | loadSetdexScript(); 192 | if (gen >= 5) { 193 | if (isCustomMods) { 194 | $(".custom-mods-group").show(); 195 | } 196 | else { 197 | $(".custom-mods-group").hide(); 198 | } 199 | } 200 | if (gen >= 8) { 201 | if (localStorage.getItem("dex") == "vgcdex") { 202 | for (i = 1; i <= 4; i++) { 203 | $('label[for="zL' + i + '"]').show(); 204 | $('label[for="zR' + i + '"]').show(); 205 | } 206 | $('div #primal-weather').show(); 207 | } 208 | else { 209 | for (i = 1; i <= 4; i++) { 210 | $('label[for="zL' + i + '"]').hide(); 211 | $('label[for="zR' + i + '"]').hide(); 212 | } 213 | $('div #primal-weather').hide(); 214 | } 215 | } 216 | if (gen >= 9) { 217 | if (localStorage.getItem("dex") == "vgcdex") { 218 | $('div #auras').show(); 219 | $('div #protect-field').show(); 220 | $('div #flower-gift').show(); 221 | } 222 | else { 223 | $('div #auras').hide(); 224 | $('div #protect-field').hide(); 225 | $('div #flower-gift').hide(); 226 | } 227 | } 228 | if (typeChart !== undefined) { 229 | var types = Object.keys(typeChart); 230 | if (types.indexOf('Typeless') !== -1) 231 | types.splice(types.indexOf('Typeless'), 1); 232 | var teraTypes = $.extend(true, [], types); 233 | if (gen >= 2) types.push('Typeless'); 234 | if (types.indexOf('Stellar') !== -1) 235 | types.splice(types.indexOf('Stellar'), 1); 236 | var typeOptions = getSelectOptions(types); 237 | var teraTypeOptions = getSelectOptions(teraTypes); 238 | } 239 | $("select.type1, select.move-type").find("option").remove().end().append(typeOptions); 240 | $("select.type2").find("option").remove().end().append("" + typeOptions); 241 | $("select.tera-type").find("option").remove().end().append(teraTypeOptions); 242 | var moveOptions = getSelectOptions(Object.keys(moves), true); 243 | $("select.move-selector").find("option").remove().end().append(moveOptions); 244 | var abilityOptions = getSelectOptions(abilities, true); 245 | $("select.ability").find("option").remove().end().append("" + abilityOptions); 246 | var itemOptions = getSelectOptions(items, true); 247 | $("select.item").find("option").remove().end().append("" + itemOptions); 248 | 249 | resetSetSelectors(); 250 | } 251 | 252 | function loadSets(p) { 253 | setStartup(p); 254 | $(p + " .set-selector").val(getSetOptions(p)[gen > 3 ? 1 : gen === 1 ? 5 : 3].id); 255 | $(p + " .set-selector").change(); 256 | } 257 | 258 | function toggleAFD() { 259 | if (!localStorage.getItem("isAFD")) { 260 | localStorage.setItem("isAFD", true); 261 | alert("April Fools' Day mode activated! (This just adds two joke characters to SV. Refresh to see them.)"); 262 | } 263 | else { 264 | localStorage.removeItem("isAFD"); 265 | alert("April Fools' Day mode deactivated. Refresh to see the change."); 266 | } 267 | } -------------------------------------------------------------------------------- /script_res/ap_calc.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --slider-color-p1: #23b928; 3 | --slider-color-p2: #23b928; 4 | } 5 | /* general page styling */ 6 | body { 7 | font: 12px Verdana, sans-serif; 8 | background-color: #bbeedd; 9 | padding: 0 1em; 10 | min-width: 120em; 11 | } 12 | fieldset { 13 | float: left; 14 | background-color: #ddffee; 15 | } 16 | legend { 17 | font-weight: bold; 18 | } 19 | th, td { 20 | padding: 0; 21 | } 22 | th { 23 | font-size: 0.8em; 24 | } 25 | 26 | .title-text { 27 | font-weight: bold; 28 | font-size: 1.5em; 29 | height: 50px; 30 | } 31 | .yeartag { 32 | margin-right: 1em; 33 | margin-left: 0.5em; 34 | vertical-align:middle 35 | } 36 | .big-text { 37 | display: inline-block; 38 | font-weight: bold; 39 | font-size: 1.2em; 40 | margin: 0.5em 0; 41 | } 42 | .small-text { 43 | font-size: 0.9em; 44 | } 45 | .panel { 46 | float: left; 47 | display: inline-block; 48 | } 49 | .poke-info { 50 | /*width: 33.1em;*/ 51 | width: 40em; 52 | } 53 | .field-info { 54 | width: 30em; 55 | } 56 | .generations { 57 | padding-left: 1em; 58 | } 59 | 60 | /* general button styling */ 61 | .btn { 62 | text-align: center; 63 | border: solid 1px #aaaaaa; 64 | padding: 4px 8px; 65 | position: relative; 66 | cursor: pointer; 67 | color: #555555; 68 | background: #e9e9e9; 69 | margin: -1px -3px 0; 70 | display: inline-block; 71 | width: 5em; 72 | border-radius: 8px; 73 | } 74 | .btn-wide { 75 | width: 7em; 76 | } 77 | .btn-xwide { 78 | width: 8em; 79 | } 80 | .btn-xxwide { 81 | width: 9em; 82 | } 83 | .btn-xxxwide { 84 | width: 10em; 85 | } 86 | .btn-xxxxwide { 87 | width: 11em; 88 | } 89 | .btn-small { 90 | width: 4em; 91 | } 92 | .btn-xsmall { 93 | width: 1em; 94 | } 95 | .btn-left { 96 | border-top-right-radius: 0; 97 | border-bottom-right-radius: 0; 98 | } 99 | .btn-right { 100 | border-top-left-radius: 0; 101 | border-bottom-left-radius: 0; 102 | } 103 | .btn-top { 104 | border-bottom-left-radius: 0; 105 | border-bottom-right-radius: 0; 106 | } 107 | .btn-bottom { 108 | border-top-left-radius: 0; 109 | border-top-right-radius: 0; 110 | } 111 | .btn-mid { 112 | border-radius: 0; 113 | } 114 | .btn:hover { 115 | z-index: 10; 116 | border-color: #777777; 117 | background: #e3e3e3; 118 | } 119 | .btn-input:checked + .btn { 120 | font-weight: bold; 121 | color: #111111; 122 | background: #f5f5f5; 123 | } 124 | .btn-input[type="radio"]:checked + .btn { 125 | cursor: default; 126 | } 127 | .btn-input { 128 | display: none; 129 | } 130 | .btn-input:disabled + .btn { 131 | color: #999999; 132 | } 133 | .btn-group { 134 | display: inline-block; 135 | width: 100%; 136 | } 137 | .left { 138 | float: left; 139 | } 140 | .right { 141 | float: right; 142 | } 143 | 144 | .locked-move:checked + .btn { 145 | background: #ffff99; 146 | } 147 | .dark .locked-move:checked + .btn { 148 | background: #10171e !important; 149 | } 150 | 151 | .divider { 152 | width: 5em; 153 | display: inline; 154 | } 155 | 156 | 157 | 158 | /* header */ 159 | .move-result-group { 160 | max-width: 80em; 161 | min-width: 50em; 162 | margin: 1em 0 12em; 163 | } 164 | .move-result-subgroup { 165 | float: left; 166 | width: 50%; 167 | } 168 | .move-result-group .btn { 169 | margin-right: 1em; 170 | } 171 | .main-result-group { 172 | margin: 2em 0 1em; 173 | } 174 | .result-move-header { 175 | font-size: 0.8em; 176 | font-weight: bold; 177 | margin: 0 0 5px; 178 | } 179 | 180 | /* pokemon info */ 181 | select.hidden-power { 182 | width:120px; 183 | font: 12px Verdana, sans-serif; 184 | } 185 | .hidden-power-type { 186 | text-align:center; 187 | } 188 | .poke-info label { 189 | display: inline-block; 190 | width: 6em; 191 | } 192 | .poke-info input:not([type]), .poke-info input[type="text"], .poke-info span :not(.select2-chosen) { 193 | display: inline-block; 194 | width: 2.5em; 195 | } 196 | .poke-info input[type="number"] { 197 | display: inline-block; 198 | width: 3em; 199 | } 200 | .info-group { 201 | margin: 1em 0; 202 | } 203 | .set-selector { 204 | width: 28em; 205 | } 206 | .info-selectors select { 207 | width: 12em; 208 | } 209 | select.ability-supreme, select.ability-proto-quark { 210 | width: 4.5em; 211 | } 212 | select.ability-rivalry { 213 | width: 8em; 214 | } 215 | select.toxic-counter { 216 | width: 4.5em; 217 | } 218 | .move-selector, .move-bp, .move-type, .move-cat, .move-hits, .move-double, .move-stellar, .move-pledge, .move-linearAddedBP, .move-opponent { 219 | font-size: 0.9em; 220 | } 221 | .move-selector{ 222 | width: 9.0em; 223 | } 224 | .item, .ability { 225 | font-size: 1.1em; 226 | width: 12.15em; 227 | } 228 | .poke-info input.move-bp { 229 | width: 2em; 230 | } 231 | .move-cat, .move-linearAddedBP { 232 | width: 4em; 233 | } 234 | .move-hits, .move-double, .move-stellar, .move-pledge, .move-opponent { 235 | width: 4.6em; 236 | } 237 | .abilityToggle, .ability-advanced{ 238 | margin-top: 0px; 239 | } 240 | .poke-info .crit-btn { 241 | font-size: 0.8em; 242 | width: 2.5em; 243 | height: 1em; 244 | padding: 3px 3px; 245 | } 246 | .poke-info .x-btn { 247 | font-size: 0.8em; 248 | width: 3.5em; 249 | height: 1em; 250 | padding: 3px 3px; 251 | margin-left: 0.3em; 252 | } 253 | .poke-info .xx-btn { 254 | font-size: 0.8em; 255 | width: 3.8em; 256 | height: 1em; 257 | padding: 3px 3px; 258 | margin-left: 0.3em; 259 | } 260 | .poke-info .ev-total, .poke-info .ev-left { 261 | font-size: 0.8em; 262 | } 263 | 264 | .poke-info .underLimit { 265 | color: #000000; 266 | } 267 | 268 | .poke-info .overLimit { 269 | color: #CC0000; 270 | } 271 | input.custmod.calc-trigger{ 272 | width: 3.5em; 273 | } 274 | 275 | /* field info */ 276 | .field-info .btn { 277 | font-size: 0.8em; 278 | } 279 | 280 | .hide { 281 | display: none; 282 | } 283 | 284 | /* select2 overrides */ 285 | .small-select.select2-container .select2-choice { 286 | font-size: 0.9em; 287 | height: 18px; 288 | line-height: 18px; 289 | } 290 | .small-select.select2-container .select2-choice .select2-arrow b { 291 | background-position: 0 -4px; 292 | } 293 | .small-select.select2-dropdown-open .select2-choice .select2-arrow b { 294 | background-position: -18px -4px; 295 | } 296 | 297 | .hp-bar { 298 | -webkit-appearance: none; 299 | width: 100%; 300 | height: 8px; 301 | border-radius: 5px; 302 | background: linear-gradient(to right, #23b928 100%, #606060 0%); 303 | outline: none; 304 | -webkit-transition: .2s; 305 | transition: opacity .2s; 306 | cursor: pointer; 307 | } 308 | .hp-bar::-webkit-slider-thumb { 309 | -webkit-appearance: none; 310 | width: 15px; 311 | height: 15px; 312 | border-radius: 50%; 313 | /*cursor: pointer;*/ 314 | } 315 | #p1 .hp-bar::-webkit-slider-thumb { 316 | background: var(--slider-color-p1); 317 | } 318 | #p2 .hp-bar::-webkit-slider-thumb { 319 | background: var(--slider-color-p2); 320 | } 321 | .hp-bar::-moz-range-thumb { 322 | width: 15px; 323 | height: 15px; 324 | border-radius: 50%; 325 | /*cursor: pointer;*/ 326 | } 327 | #p1 .hp-bar::-moz-range-thumb { 328 | background: var(--slider-color-p1); 329 | } 330 | 331 | #p2 .hp-bar::-moz-range-thumb { 332 | background: var(--slider-color-p2); 333 | } 334 | 335 | 336 | #autolevel { 337 | float: right; 338 | color: #fff; 339 | text-decoration: none; 340 | } 341 | .onoffswitch { 342 | float: right; 343 | position: relative; width: 70px; 344 | -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none; 345 | display: inline-block; 346 | 347 | } 348 | .onoffswitch-checkbox { 349 | display: none; 350 | } 351 | .onoffswitch-label { 352 | display: block; overflow: hidden; cursor: pointer; 353 | border: 2px solid #999999; border-radius: 8px; 354 | } 355 | .onoffswitch-inner { 356 | display: block; width: 200%; margin-left: -100%; 357 | transition: margin 0.3s ease-in 0s; 358 | } 359 | .onoffswitch-inner:before, .onoffswitch-inner:after { 360 | display: block; float: left; width: 50%; height: 20px; padding: 0; line-height: 20px; 361 | font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold; 362 | box-sizing: border-box; 363 | } 364 | .onoffswitch-inner:before { 365 | content: "50"; 366 | padding-left: 10px; 367 | background-color: #192121; color: #fff; 368 | } 369 | .onoffswitch-inner:after { 370 | content: "100"; 371 | padding-right: 10px; 372 | background-color: #F3F3F3; color: #31313a; 373 | text-align: right; 374 | } 375 | .onoffswitch-switch { 376 | display: block; width: 10px; margin: 5px; 377 | background: #FFFFFF; 378 | position: absolute; top: 0; bottom: 0; 379 | right: 46px; 380 | border: 2px solid #999999; border-radius: 8px; 381 | transition: all 0.3s ease-in 0s; 382 | } 383 | .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { 384 | margin-left: 0; 385 | } 386 | .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { 387 | right: 0px; 388 | } 389 | button.pkmnsc { 390 | width: 60px; 391 | min-height: 44px; 392 | text-align: center; 393 | } 394 | button.trashsc, button.editsc { 395 | width: 24px; 396 | height: 24px; 397 | } 398 | button.addsc { 399 | width: 114.25px; 400 | } 401 | button.pkmnsc, button.trashsc, button.editsc, button.addsc{ 402 | cursor: pointer; 403 | } 404 | 405 | #mainResult { 406 | visibility: visible; 407 | cursor: pointer; 408 | } -------------------------------------------------------------------------------- /script_res/damage_SV.js: -------------------------------------------------------------------------------- 1 | /* Damage calculation for the Generation IX games: Scarlet and Violet; 2 | * for the Generation VIII games: Sword, Shield, Brilliant Diamond, and Shining Pearl; 3 | * and for the Generation VII games: Sun, Moon, Ultra Sun, and Ultra Moon */ 4 | 5 | function CALCULATE_ALL_MOVES_SV(p1, p2, field) { 6 | checkTrace(p1, p2); 7 | checkTrace(p2, p1); 8 | checkNeutralGas(p1, p2, field.getNeutralGas()); 9 | checkAirLock(p1, field); 10 | checkAirLock(p2, field); 11 | checkForecast(p1, field.getWeather()); 12 | checkForecast(p2, field.getWeather()); 13 | checkMimicry(p1, field.getTerrain()); 14 | checkMimicry(p2, field.getTerrain()); 15 | checkTerastal(p1); 16 | checkTerastal(p2); 17 | checkKlutz(p1); 18 | checkKlutz(p2); 19 | checkEvo(p1, p2); 20 | checkParadoxAbilities(p1, field.getTerrain(), field.getWeather()); 21 | checkParadoxAbilities(p2, field.getTerrain(), field.getWeather()); 22 | checkSeeds(p1, field.getTerrain()); 23 | checkSeeds(p2, field.getTerrain()); 24 | checkSwordShield(p1); 25 | checkSwordShield(p2); 26 | checkWindRider(p1, field.getTailwind(0)); 27 | checkWindRider(p2, field.getTailwind(1)); 28 | checkIntimidate(p1, p2); 29 | checkIntimidate(p2, p1); 30 | checkSupersweetSyrup(p1, p2); 31 | checkSupersweetSyrup(p2, p1); 32 | checkDownload(p1, p2); 33 | checkDownload(p2, p1); 34 | checkEmbodyAspect(p1); 35 | checkEmbodyAspect(p2); 36 | checkBattleBond(p1); 37 | checkBattleBond(p2); 38 | p1.stats[AT] = getModifiedStat(p1.rawStats[AT], p1.boosts[AT]); //new order is important for the proper Protosynthesis/Quark Drive boost 39 | p1.stats[DF] = getModifiedStat(p1.rawStats[DF], p1.boosts[DF]); 40 | p1.stats[SA] = getModifiedStat(p1.rawStats[SA], p1.boosts[SA]); 41 | p1.stats[SD] = getModifiedStat(p1.rawStats[SD], p1.boosts[SD]); 42 | p1.stats[SP] = getModifiedStat(p1.rawStats[SP], p1.boosts[SP]); 43 | setHighestStat(p1, 0); 44 | p1.stats[SP] = getFinalSpeed(p1, field.getWeather(), field.getTailwind(0), field.getSwamp(0), field.getTerrain()); 45 | $(".p1-speed-mods").text(p1.stats[SP]); 46 | p2.stats[AT] = getModifiedStat(p2.rawStats[AT], p2.boosts[AT]); 47 | p2.stats[DF] = getModifiedStat(p2.rawStats[DF], p2.boosts[DF]); 48 | p2.stats[SA] = getModifiedStat(p2.rawStats[SA], p2.boosts[SA]); 49 | p2.stats[SD] = getModifiedStat(p2.rawStats[SD], p2.boosts[SD]); 50 | p2.stats[SP] = getModifiedStat(p2.rawStats[SP], p2.boosts[SP]); 51 | setHighestStat(p2, 1); 52 | p2.stats[SP] = getFinalSpeed(p2, field.getWeather(), field.getTailwind(1), field.getSwamp(1), field.getTerrain()); 53 | $(".p2-speed-mods").text(p2.stats[SP]); 54 | var side1 = field.getSide(1); 55 | var side2 = field.getSide(0); 56 | checkInfiltrator(p1, side1); 57 | checkInfiltrator(p2, side2); 58 | getWeightMods(p1, p2); 59 | var results = [[],[]]; 60 | for (var i = 0; i < 4; i++) { 61 | results[0][i] = GET_DAMAGE_SV(p1, p2, p1.moves[i], side1); 62 | results[1][i] = GET_DAMAGE_SV(p2, p1, p2.moves[i], side2); 63 | } 64 | return results; 65 | } 66 | 67 | function GET_DAMAGE_SV(attacker, defender, move, field) { 68 | var moveDescName = move.name; 69 | var isQuarteredByProtect = false, isMeFirst = false; 70 | 71 | var attIsGrounded = pIsGrounded(attacker, field); 72 | var defIsGrounded = pIsGrounded(defender, field); 73 | 74 | if (move.name == 'Me First') 75 | [move, moveDescName, isMeFirst] = checkMeFirst(move, moveDescName, defender, attacker.isDynamax); 76 | 77 | checkMoveTypeChange(move, field, attacker); 78 | checkConditionalPriority(move, field.terrain, attacker, attIsGrounded); 79 | checkConditionalSpread(move, field.terrain, attacker, attIsGrounded); 80 | 81 | if (attacker.isDynamax && gen === 8) //without the gen check a Dynamaxed Pokemon can lead to an error switching between gen 8 and either 7 or 9 82 | [move, isQuarteredByProtect, moveDescName] = MaxMoves(move, attacker, isQuarteredByProtect, moveDescName, field); 83 | else if (move.name == "Nature Power" && attacker.item !== 'Assault Vest') 84 | [move, moveDescName] = NaturePower(move, field, moveDescName); 85 | 86 | if (move.isZ || move.isSignatureZ) 87 | [move, isQuarteredByProtect, moveDescName] = ZMoves(move, field, attacker, isQuarteredByProtect, moveDescName); 88 | 89 | //Needs to be after the Z-move check since Light That Burns The Sky can change category 90 | if (usesPhysicalAttack(attacker, defender, move)) { 91 | move.category = "Physical"; 92 | } 93 | 94 | //Placed here so 1) Me First moves get contact, and 2) physical Shell Side Arm gets contact 95 | checkContactOverride(move, attacker); 96 | 97 | attacker_name = attacker.name; 98 | if (attacker_name && attacker_name.includes("-Gmax")) attacker_name = attacker_name.substring(0, attacker_name.indexOf('-Gmax')); 99 | defender_name = defender.name; 100 | if (defender_name && defender_name.includes("-Gmax")) defender_name = defender_name.substring(0, defender_name.indexOf('-Gmax')); 101 | 102 | var description = { 103 | "attackerName": attacker_name, 104 | "moveName": moveDescName, 105 | "defenderName": defender_name 106 | }; 107 | 108 | addLevelDesc(attacker, defender, description); 109 | 110 | if (move.bp === 0 || move.category === "Status") { 111 | return statusMoves(move, attacker, defender, description); 112 | } 113 | 114 | description.attackerTera = attacker.isTerastalize ? attacker.tera_type : false; 115 | description.defenderTera = defender.isTerastalize ? defender.tera_type : false; 116 | 117 | var defAbility = defender.ability; 118 | [defAbility, description] = abilityIgnore(attacker, move, defAbility, description, defender.item); 119 | 120 | var isCritical = critMove(move, defAbility); 121 | 122 | var ateIzeAbility = ATE_IZE_ABILITIES.indexOf(attacker.ability); //Confirms abilities like Normalize and Pixilate but not Liquid Voice 123 | var ateIzeBoosted; 124 | if (!move.isZ && (ateIzeAbility !== -1 || attacker.ability == "Liquid Voice") 125 | && ['Hidden Power', 'Weather Ball', 'Natural Gift', 'Judgement', 'Techno Blast', 'Revelation Dance', 'Multi-Attack', 'Terrain Pulse'].indexOf(move.name) === -1) { 126 | [move, description, ateIzeBoosted] = ateIzeTypeChange(move, attacker, description); 127 | } 128 | 129 | var typeEffect1 = getMoveEffectiveness(move, defender.type1, defender.type2, description, field.isForesight, ["Scrappy", "Mind's Eye"].indexOf(attacker.ability) != -1 ? attacker.ability : false, field.isGravity, defender.item, field.weather === "Strong Winds", defender.isTerastalize); 130 | var typeEffect2 = defender.type2 && defender.type2 !== defender.type1 && move.type !== 'Stellar' ? getMoveEffectiveness(move, defender.type2, defender.type1, description, field.isForesight, ["Scrappy", "Mind's Eye"].indexOf(attacker.ability) != -1 ? attacker.ability : false, field.isGravity, defender.item, field.weather === "Strong Winds", defender.isTerastalize) : 1; 131 | var typeEffectiveness = typeEffect1 * typeEffect2; 132 | immuneBuildDesc = immunityChecks(move, attacker, defender, field, description, defAbility, typeEffectiveness); 133 | if (immuneBuildDesc !== -1) return immuneBuildDesc; 134 | typeEffectiveness = checkTeraShell(defAbility === 'Tera Shell' && defender.curHP === defender.maxHP, description, typeEffectiveness); 135 | 136 | getHPInfo(description, defender); 137 | 138 | setDamageBuildDesc = setDamage(move, attacker, defender, description, isQuarteredByProtect, field); 139 | if (setDamageBuildDesc !== -1) return setDamageBuildDesc; 140 | 141 | if (move.hitRange) { 142 | description.hits = move.hits; 143 | } 144 | var turnOrder = attacker.stats[SP] > defender.stats[SP] ? "FIRST" : "LAST"; 145 | 146 | //////////////////////////////// 147 | ////////// BASE POWER ////////// 148 | //////////////////////////////// 149 | var basePower; 150 | [basePower, description] = basePowerFunc(move, description, turnOrder, attacker, defender, field, attIsGrounded, defIsGrounded, defAbility); 151 | 152 | var bpMods; 153 | [bpMods, description, move] = calcBPMods(attacker, defender, field, move, description, ateIzeBoosted, basePower, attIsGrounded, defIsGrounded, turnOrder, defAbility, isMeFirst); 154 | 155 | basePower = Math.max(1, pokeRound(basePower * chainMods(bpMods) / 0x1000)); 156 | 157 | //////////////////////////////// 158 | ////////// (SP)ATTACK ////////// 159 | //////////////////////////////// 160 | 161 | var attack; 162 | [attack, description] = calcAttack(move, attacker, defender, description, isCritical, defAbility); 163 | 164 | var atMods; 165 | [atMods, description] = calcAtMods(move, attacker, defAbility, description, field); 166 | 167 | attack = Math.max(1, pokeRound(attack * chainMods(atMods) / 0x1000)); 168 | 169 | //////////////////////////////// 170 | ///////// (SP)DEFENSE ////////// 171 | //////////////////////////////// 172 | var hitsPhysical = move.category === "Physical" || move.dealsPhysicalDamage; 173 | 174 | var defense; 175 | [defense, description] = calcDefense(move, attacker, defender, description, hitsPhysical, isCritical, field); 176 | 177 | var dfMods; 178 | [dfMods, description] = calcDefMods(move, defender, field, description, hitsPhysical, defAbility); 179 | 180 | defense = Math.max(1, pokeRound(defense * chainMods(dfMods) / 0x1000)); 181 | 182 | //////////////////////////////// 183 | //////////// DAMAGE //////////// 184 | //////////////////////////////// 185 | var baseDamage = calcBaseDamage(attacker, basePower, attack, defense); 186 | 187 | 188 | return calcGeneralMods(baseDamage, move, attacker, defender, defAbility, field, description, isCritical, typeEffectiveness, isQuarteredByProtect, hitsPhysical); 189 | } 190 | -------------------------------------------------------------------------------- /script_res/ability_data.js: -------------------------------------------------------------------------------- 1 | var ABILITIES_ADV = [ 2 | //RSFRLGE abilities 3 | 'Stench', 4 | 'Drizzle', 5 | 'Speed Boost', 6 | 'Battle Armor', 7 | 'Sturdy', 8 | 'Damp', 9 | 'Limber', 10 | 'Sand Veil', 11 | 'Static', 12 | 'Volt Absorb', 13 | 'Water Absorb', 14 | 'Oblivious', 15 | 'Cloud Nine', 16 | 'Compound Eyes', 17 | 'Insomnia', 18 | 'Color Change', 19 | 'Immunity', 20 | 'Flash Fire', 21 | 'Shield Dust', 22 | 'Own Tempo', 23 | 'Suction Cups', 24 | 'Intimidate', 25 | 'Shadow Tag', 26 | 'Rough Skin', 27 | 'Wonder Guard', 28 | 'Levitate', 29 | 'Effect Spore', 30 | 'Synchronize', 31 | 'Clear Body', 32 | 'Natural Cure', 33 | 'Lightning Rod', 34 | 'Serene Grace', 35 | 'Swift Swim', 36 | 'Chlorophyll', 37 | 'Illuminate', 38 | 'Trace', 39 | 'Huge Power', 40 | 'Poison Point', 41 | 'Inner Focus', 42 | 'Magma Armor', 43 | 'Water Veil', 44 | 'Magnet Pull', 45 | 'Soundproof', 46 | 'Rain Dish', 47 | 'Sand Stream', 48 | 'Pressure', 49 | 'Thick Fat', 50 | 'Early Bird', 51 | 'Flame Body', 52 | 'Run Away', 53 | 'Keen Eye', 54 | 'Hyper Cutter', 55 | 'Pickup', 56 | 'Truant', 57 | 'Hustle', 58 | 'Cute Charm', 59 | 'Plus', 60 | 'Minus', 61 | 'Forecast', 62 | 'Sticky Hold', 63 | 'Shed Skin', 64 | 'Guts', 65 | 'Marvel Scale', 66 | 'Liquid Ooze', 67 | 'Overgrow', 68 | 'Blaze', 69 | 'Torrent', 70 | 'Swarm', 71 | 'Rock Head', 72 | 'Drought', 73 | 'Arena Trap', 74 | 'Vital Spirit', 75 | 'White Smoke', 76 | 'Pure Power', 77 | 'Shell Armor', 78 | 'Air Lock', 79 | ]; 80 | 81 | var ABILITIES_DPP = ABILITIES_ADV.concat([ 82 | //DPPHGSS abilities 83 | 'Tangled Feet', 84 | 'Motor Drive', 85 | 'Rivalry', 86 | 'Steadfast', 87 | 'Snow Cloak', 88 | 'Gluttony', 89 | 'Anger Point', 90 | 'Unburden', 91 | 'Heatproof', 92 | 'Simple', 93 | 'Dry Skin', 94 | 'Download', 95 | 'Iron Fist', 96 | 'Poison Heal', 97 | 'Adaptability', 98 | 'Skill Link', 99 | 'Hydration', 100 | 'Solar Power', 101 | 'Quick Feet', 102 | 'Normalize', 103 | 'Sniper', 104 | 'Magic Guard', 105 | 'No Guard', 106 | 'Stall', 107 | 'Technician', 108 | 'Leaf Guard', 109 | 'Klutz', 110 | 'Mold Breaker', 111 | 'Super Luck', 112 | 'Aftermath', 113 | 'Anticipation', 114 | 'Forewarn', 115 | 'Unaware', 116 | 'Tinted Lens', 117 | 'Filter', 118 | 'Slow Start', 119 | 'Scrappy', 120 | 'Storm Drain', 121 | 'Ice Body', 122 | 'Solid Rock', 123 | 'Snow Warning', 124 | 'Honey Gather', 125 | 'Frisk', 126 | 'Reckless', 127 | 'Multitype', 128 | 'Flower Gift', 129 | 'Bad Dreams', 130 | ]); 131 | 132 | var ABILITIES_BW = ABILITIES_DPP.concat([ 133 | //BWB2W2 ablities 134 | 'Pickpocket', 135 | 'Sheer Force', 136 | 'Contrary', 137 | 'Unnerve', 138 | 'Defiant', 139 | 'Defeatist', 140 | 'Cursed Body', 141 | 'Healer', 142 | 'Friend Guard', 143 | 'Weak Armor', 144 | 'Heavy Metal', 145 | 'Light Metal', 146 | 'Harvest', 147 | 'Telepathy', 148 | 'Multiscale', 149 | 'Toxic Boost', 150 | 'Flare Boost', 151 | 'Moody', 152 | 'Overcoat', 153 | 'Poison Touch', 154 | 'Regenerator', 155 | 'Big Pecks', 156 | 'Sand Rush', 157 | 'Wonder Skin', 158 | 'Analytic', 159 | 'Illusion', 160 | 'Imposter', 161 | 'Infiltrator', 162 | 'Mummy', 163 | 'Moxie', 164 | 'Justified', 165 | 'Rattled', 166 | 'Magic Bounce', 167 | 'Sap Sipper', 168 | 'Prankster', 169 | 'Sand Force', 170 | 'Iron Barbs', 171 | 'Zen Mode', //Might implement functionality 172 | 'Victory Star', 173 | 'Turboblaze', 174 | 'Teravolt', 175 | ]); 176 | 177 | var ABILITIES_XY = ABILITIES_BW.concat([ 178 | //XY abilities 179 | 'Aroma Veil', 180 | 'Flower Veil', 181 | 'Cheek Pouch', //Maybe implement functionality 182 | 'Protean', 183 | 'Fur Coat', 184 | 'Magician', 185 | 'Bulletproof', 186 | 'Competitive', 187 | 'Strong Jaw', 188 | 'Refrigerate', 189 | 'Sweet Veil', 190 | 'Stance Change', 191 | 'Gale Wings', 192 | 'Mega Launcher', 193 | 'Grass Pelt', 194 | 'Symbiosis', 195 | 'Tough Claws', 196 | 'Pixilate', 197 | 'Gooey', 198 | 'Aerilate', 199 | 'Parental Bond', 200 | 'Dark Aura', 201 | 'Fairy Aura', 202 | 'Aura Break', 203 | //ORAS abilities 204 | 'Primordial Sea', 205 | 'Desolate Land', 206 | 'Delta Stream', 207 | ]); 208 | 209 | var ABILITIES_SM = ABILITIES_XY.concat([ 210 | //SM abilities 211 | 'Stamina', 212 | 'Wimp Out', 213 | 'Emergency Exit', 214 | 'Water Compaction', 215 | 'Merciless', 216 | 'Shields Down', 217 | 'Stakeout', 218 | 'Water Bubble', 219 | 'Steelworker', 220 | 'Berserk', 221 | 'Slush Rush', 222 | 'Long Reach', 223 | 'Liquid Voice', 224 | 'Triage', 225 | 'Galvanize', 226 | 'Surge Surfer', 227 | 'Schooling', 228 | 'Disguise', 229 | 'Battle Bond', 230 | 'Power Construct', 231 | 'Corrosion', 232 | 'Comatose', 233 | 'Queenly Majesty', 234 | 'Innards Out', 235 | 'Dancer', 236 | 'Battery', 237 | 'Fluffy', 238 | 'Dazzling', 239 | 'Soul-Heart', 240 | 'Tangling Hair', 241 | 'Receiver', 242 | 'Power of Alchemy', 243 | 'Beast Boost', 244 | 'RKS System', 245 | 'Electric Surge', 246 | 'Psychic Surge', 247 | 'Misty Surge', 248 | 'Grassy Surge', 249 | 'Full Metal Body', 250 | 'Shadow Shield', 251 | 'Prism Armor', 252 | //USUM abilities 253 | 'Neuroforce', 254 | ]); 255 | 256 | var ABILITIES_SS = ABILITIES_SM.concat([ 257 | //SS abilities 258 | 'Intrepid Sword', 259 | 'Dauntless Shield', 260 | 'Libero', 261 | 'Ball Fetch', 262 | 'Cotton Down', 263 | 'Propeller Tail', 264 | 'Mirror Armor', 265 | 'Gulp Missile', 266 | 'Steam Engine', 267 | 'Stalwart', 268 | "Punk Rock", 269 | 'Sand Spit', 270 | 'Ice Scales', 271 | 'Ripen', 272 | 'Ice Face', 273 | 'Power Spot', 274 | 'Mimicry', 275 | 'Screen Cleaner', 276 | 'Steely Spirit', 277 | 'Perish Body', 278 | 'Wandering Spirit', 279 | "Gorilla Tactics", 280 | 'Neutralizing Gas', 281 | 'Pastel Veil', 282 | 'Hunger Switch', 283 | //IoA abilities 284 | 'Quick Draw', 285 | 'Unseen Fist', 286 | //CT abilities 287 | 'Curious Medicine', 288 | 'Transistor', 289 | "Dragon's Maw", 290 | 'Chilling Neigh', 291 | 'Grim Neigh', 292 | 'As One', 293 | ]); 294 | 295 | var ABILITIES_SV = ABILITIES_SS.concat([ 296 | 'Lingering Aroma', //Mummy clone, no calc functionality 297 | 'Seed Sower', //Grassy Terrain when hit 298 | 'Thermal Exchange', //+1 Atk when hit by Fire and cannot be burned, no calc functionality 299 | 'Anger Shell', //+1 Atk SpA Spe -1 Def SpD at half health, consider calc functionality 300 | 'Purifying Salt', //half Ghost damage taken and status condition immunity 301 | 'Well-Baked Body', //Fire immunity and +2 Def when hit 302 | 'Wind Rider', //Wind move immunity and +1 Atk when hit or Tailwind is set 303 | 'Guard Dog', //Boosted Attack from Intimidate, switch-out moves fail 304 | 'Rocky Payload', //increase Rock damage dealt by 1.5x 305 | 'Wind Power', //charge when hit by wind move, abilityOff like Electromorphosis 306 | 'Zero to Hero', //changes form when switching out, no calc functionality 307 | 'Commander', //all effects are related to the one mon, no calc functionality 308 | 'Electromorphosis', //already added, charge as an ability 309 | 'Protosynthesis', //activates in sun or with Booster Energy, determines stat like Beast Boost 310 | 'Quark Drive', //activates in electric terrain or with Booster Energy, determines stat like Beast Boost 311 | 'Good as Gold', //status move immunity, no calc functionality 312 | 'Vessel of Ruin', //NOT A STAT DROP, IT'S A BASE STAT MODIFIER 313 | 'Sword of Ruin', //SEE ABOVE 314 | 'Tablets of Ruin', //SEE ABOVE 315 | 'Beads of Ruin', //SEE ABOVE 316 | 'Orichalcum Pulse', //sun AND stat mod 317 | 'Hadron Engine', //electric terrain AND stat mod 318 | 'Opportunist', //boosts same stats as opponent, might have calc functionality but probably not 319 | 'Cud Chew', //reuse the same berry, no calc functionality 320 | 'Sharpness', //increase slicing move damage dealt 321 | 'Supreme Overlord', //Atk/SpA boost for each ally defeated by +0.1x 322 | 'Costar', //copies ally stat changes, no calc functionality 323 | 'Toxic Debris', //Toxic Spikes for every physical hit, no calc functionality 324 | 'Armor Tail', //Queenly Majesty/Dazzling again 325 | 'Earth Eater', //Ground type Water Absorb 326 | 'Mycelium Might', //inverse Prankster, no calc functionality 327 | //Teal Mask DLC new additions 328 | 'Hospitality', //Heals ally's HP, no calc functionality 329 | "Mind's Eye", //Ignores evasion/accuracy and is Scrappy w/o Intimidate immunity 330 | 'Embody Aspect', //Boosts Ogerpon's stats based on mask 331 | 'Toxic Chain', //Poison Touch but with badly poisoned instead, no calc functionality 332 | 'Supersweet Syrup', //Intimidate but with evasion and only once 333 | //Indigo Disk new additions 334 | 'Tera Shift', //Transforms Terapagos into Tera form 335 | 'Tera Shell', //Max HP means all attacks are not very effective 336 | 'Teraform Zero', //Removes weather and terrain 337 | 'Poison Puppeteer', //Poisoning also confuses, no calc funcitonality 338 | ]); 339 | 340 | //ABILITIES_XY.splice(ABILITIES_XY.indexOf('Lightning Rod'), 1, 'Lightning Rod'); 341 | var ATE_IZE_ABILITIES = [ 342 | 'Normalize', 343 | 'Aerilate', 344 | 'Pixilate', 345 | 'Refrigerate', 346 | 'Galvanize', 347 | ]; -------------------------------------------------------------------------------- /script_res/sidebars.js: -------------------------------------------------------------------------------- 1 | var CURRENT_SIDEBARS = []; 2 | //left and right sidebar names used in ap_calc.js and setdex_custom.js to make sure the user can't delete or add any sets to the sidebar without using the sidebar buttons 3 | //separated in case there are any specific checks that require individually checking each side added in the future 4 | var LEFT_SIDEBAR_NAMES = ['Left Sidebar Slot 1', 'Left Sidebar Slot 2', 'Left Sidebar Slot 3', 'Left Sidebar Slot 4', 'Left Sidebar Slot 5', 'Left Sidebar Slot 6',]; 5 | var RIGHT_SIDEBAR_NAMES = ['Right Sidebar Slot 1', 'Right Sidebar Slot 2', 'Right Sidebar Slot 3', 'Right Sidebar Slot 4', 'Right Sidebar Slot 5', 'Right Sidebar Slot 6',]; 6 | 7 | function addSidebarSlot(pnum) { 8 | var fullSetName = $('#p' + pnum + ' input.set-selector').val(); 9 | var displayName = fullSetName.substring(0, fullSetName.indexOf(" (")); 10 | CURRENT_SIDEBARS[pnum - 1].push(displayName); 11 | localStorage['g' + gen + '_sidebars'] = JSON.stringify(CURRENT_SIDEBARS); 12 | var side = pnum == 1 ? 'Left' : pnum == 2 ? 'Right' : ''; 13 | var teamnum = CURRENT_SIDEBARS[pnum - 1].length; 14 | var spreadName = side + ' Sidebar Slot ' + teamnum; 15 | //save custom set to calc 16 | savecalc(new Pokemon($('#p' + pnum)), spreadName, '#p' + pnum, displayName); 17 | side = pnum == 1 ? 'l' : pnum == 2 ? 'r' : ''; 18 | var pID = '#pkmn' + side.toUpperCase() + teamnum; 19 | $(pID).prop('title', displayName); 20 | getSidebarImg(pID + 'I', displayName); 21 | $('#' + side + teamnum).show(); 22 | checkVisibleButtons(pnum); 23 | } 24 | 25 | function editSidebarSlot(pnum, teamnum) { 26 | var fullSetName = $('#p' + pnum + ' input.set-selector').val(); 27 | var displayName = fullSetName.substring(0, fullSetName.indexOf(" (")); 28 | var side = pnum == 1 ? 'Left' : pnum == 2 ? 'Right' : ''; 29 | var spreadName = side + ' Sidebar Slot ' + teamnum; 30 | deleteSet(CURRENT_SIDEBARS[pnum - 1][teamnum - 1], spreadName); 31 | CURRENT_SIDEBARS[pnum - 1][teamnum - 1] = displayName; 32 | localStorage['g' + gen + '_sidebars'] = JSON.stringify(CURRENT_SIDEBARS); 33 | savecalc(new Pokemon($('#p' + pnum)), spreadName, '#p' + pnum, displayName); 34 | var pID = '#pkmn' + (pnum == 1 ? 'L' : pnum == 2 ? 'R' : '') + teamnum; 35 | $(pID).prop('title', displayName); 36 | getSidebarImg(pID + 'I', displayName); 37 | } 38 | 39 | function removeSidebarSlot(pnum, teamnum) { 40 | var monName = CURRENT_SIDEBARS[pnum - 1][teamnum - 1]; 41 | var side = pnum == 1 ? 'Left' : pnum == 2 ? 'Right' : ''; 42 | var spreadName = side + ' Sidebar Slot ' + teamnum; 43 | CURRENT_SIDEBARS[pnum - 1].splice(teamnum - 1, 1); 44 | localStorage['g' + gen + '_sidebars'] = JSON.stringify(CURRENT_SIDEBARS); 45 | $('#' + (pnum == 1 ? 'l' : pnum == 2 ? 'r' : '') + (CURRENT_SIDEBARS[pnum - 1].length + 1)).hide(); 46 | deleteSet(monName, spreadName); 47 | shiftSidebar(pnum); 48 | checkVisibleButtons(pnum); 49 | reloadSidebar(pnum); 50 | } 51 | 52 | function loadSidebar() { 53 | var side, pID, displayName, teamslot; 54 | if (localStorage['g' + gen + '_sidebars']) 55 | CURRENT_SIDEBARS = JSON.parse(localStorage['g' + gen + '_sidebars']); 56 | else 57 | CURRENT_SIDEBARS = [[],[]]; 58 | for (var i = 0; i < CURRENT_SIDEBARS.length; i++) { 59 | side = i == 0 ? 'l' : i == 1 ? 'r' : ''; 60 | pID = '#pkmn' + side.toUpperCase(); 61 | for (var j = 0; j < 6; j++) { 62 | if (j < CURRENT_SIDEBARS[i].length) { 63 | displayName = CURRENT_SIDEBARS[i][j]; 64 | teamslot = pID + (j + 1); 65 | $(teamslot).prop('title', displayName); 66 | getSidebarImg(teamslot + 'I', displayName); 67 | $('#' + side + (j + 1)).show(); 68 | } 69 | else 70 | $('#' + side + (j + 1)).hide(); 71 | } 72 | checkVisibleButtons(i + 1); 73 | } 74 | } 75 | 76 | function reloadSidebar(pnum) { 77 | var side = pnum == 1 ? 'l' : pnum == 2 ? 'r' : ''; 78 | var pID = '#pkmn' + side.toUpperCase(); 79 | var displayName, teamslot; 80 | for (var i = 0; i < CURRENT_SIDEBARS[pnum - 1].length; i++) { 81 | displayName = CURRENT_SIDEBARS[pnum - 1][i]; 82 | teamslot = pID + (i + 1); 83 | $(teamslot).prop('title', displayName); 84 | getSidebarImg(teamslot + 'I', displayName); 85 | $('#' + side + (i + 1)).show(); 86 | } 87 | } 88 | 89 | function getSidebarImg(teamslotI, displayName) { 90 | let fallbackName = displayName; 91 | let pIndex = teamslotI[5] == 'L' ? 0 : teamslotI[5] == 'R' ? 1 : -1; 92 | let slotIndex = parseInt(teamslotI[6]) - 1; 93 | let setName = pIndex == 0 ? LEFT_SIDEBAR_NAMES[slotIndex] : pIndex == 1 ? RIGHT_SIDEBAR_NAMES[slotIndex] : -1; 94 | let setDetails = setdex[displayName][setName]; 95 | 96 | if (displayName in calcToShowdownFormes) { 97 | displayName = calcToShowdownFormes[displayName]; 98 | } 99 | 100 | if (setDetails.item in MEGA_STONE_USER_LOOKUP && MEGA_STONE_USER_LOOKUP[setDetails.item].includes(displayName)) { 101 | if (setDetails.item.includes(" Orb")) { 102 | displayName = displayName + '-Primal'; 103 | } 104 | else if (displayName == "Floette-Eternal") { 105 | displayName = "Floette-Mega"; 106 | } 107 | else if (!(displayName.includes("Zygarde"))) { 108 | displayName = displayName + '-Mega'; 109 | let checkMegaXYZ = setDetails.item.indexOf(" "); 110 | if (checkMegaXYZ != -1) { 111 | displayName = displayName + "-" + setDetails.item.substring(checkMegaXYZ + 1); 112 | } 113 | } 114 | } 115 | else if (displayName == "Rayquaza" && setDetails.moves.includes("Dragon Ascent") && "Mega Rayquaza" in pokedex) { 116 | displayName = "Rayquaza-Mega"; 117 | } 118 | else if (displayName == "Meloetta" && setDetails.moves.includes("Relic Song")) { 119 | displayName = 'Meloetta-Pirouette'; 120 | } 121 | else if (displayName == "Keldeo" && setDetails.moves.includes("Secret Sword")) { 122 | displayName = 'Keldeo-Resolute'; 123 | } 124 | else if (displayName.includes("Darmanitan") && setDetails.ability == "Zen Mode") { 125 | displayName = displayName + "-Zen"; 126 | } 127 | else if (displayName == "Greninja" && setDetails.ability == "Battle Bond" && "Ash-Greninja" in pokedex) { 128 | displayName = 'Greninja-Ash'; 129 | } 130 | else if (setDetails.gmax_factor) { 131 | displayName = displayName + '-Gmax'; 132 | } 133 | 134 | if (!(['Urshifu', 'Urshifu-Rapid-Strike'].includes(displayName))) { 135 | displayName = displayName.replace(' ', '-').toLowerCase(); 136 | $(teamslotI).prop('src', 'https://www.smogon.com/forums/media/minisprites/' + displayName + '.png') 137 | .on('error', function () { 138 | fallbackName = fallbackName.replace(' ', '-').toLowerCase(); 139 | $(teamslotI).prop('src', 'https://www.smogon.com/forums/media/minisprites/' + fallbackName + '.png') 140 | .on('error', function () { 141 | $(teamslotI).prop('src', 'image_res/empty-slot.png'); 142 | }); 143 | }); 144 | } 145 | else if (displayName == 'Urshifu') { 146 | $(teamslotI).prop('src', 'image_res/urshifu-single.png'); 147 | } 148 | else if (displayName == 'Urshifu-Rapid-Strike') { 149 | $(teamslotI).prop('src', 'image_res/urshifu-rapid.png'); 150 | } 151 | } 152 | 153 | function loadPreset(p, fullSetName) { 154 | $(p + " .set-selector").val(fullSetName); 155 | $(p + " .set-selector").change(); 156 | $(p + " .set-selector").find('.select2-chosen').text(fullSetName); //used when the dropdown list doesn't contain the set it's loading 157 | } 158 | 159 | function loadSidebarSlot(pnum, teamnum) { 160 | var speciesName = CURRENT_SIDEBARS[pnum - 1][teamnum - 1]; 161 | if (speciesName in pokedex) { 162 | var slotName = speciesName + (pnum == 1 ? ' (Left' : pnum == 2 ? ' (Right' : '') + ' Sidebar Slot ' + teamnum + ')'; 163 | var p = '#p' + pnum; 164 | loadPreset(p, slotName); 165 | } 166 | else { 167 | alert('This Pokemon is not available in this mode. Switch to National Dex mode to select this Pokemon.'); 168 | } 169 | } 170 | 171 | function shiftSidebar(pnum) { 172 | //console.log(ALL_SETDEX_CUSTOM[gen]); 173 | var sidebar = CURRENT_SIDEBARS[pnum - 1]; 174 | var tempHold = [{}, {}, {}, {}, {}, {},]; 175 | var desyncStart = -1; 176 | var side = pnum == 1 ? 'Left' : pnum == 2 ? 'Right' : ''; 177 | for (var i = 0; i < sidebar.length; i++) { 178 | var tempMonSets = ALL_SETDEX_CUSTOM[gen][sidebar[i]]; 179 | if (!(side + ' Sidebar Slot ' + (i + 1) in tempMonSets)) { 180 | desyncStart = i; 181 | break; 182 | } 183 | } 184 | if (desyncStart != -1) { 185 | for (var i = desyncStart; i < sidebar.length; i++) { 186 | tempHold[i] = ALL_SETDEX_CUSTOM[gen][sidebar[i]][side + ' Sidebar Slot ' + (i + 2)]; 187 | } 188 | for (var i = desyncStart; i < sidebar.length; i++) { 189 | ALL_SETDEX_CUSTOM[gen][sidebar[i]][side + ' Sidebar Slot ' + (i + 1)] = tempHold[i]; 190 | deleteSet(sidebar[i], side + ' Sidebar Slot ' + (i + 2)); 191 | } 192 | } 193 | //console.log(ALL_SETDEX_CUSTOM[gen]); 194 | } 195 | 196 | function removeSidebarTeam(pnum) { 197 | for (var i = CURRENT_SIDEBARS[pnum - 1].length; i > 0; i--) { 198 | removeSidebarSlot(pnum, i); 199 | } 200 | } 201 | 202 | function exportSidebarTeam(pnum) { 203 | var monName = '', setdexName = '', tempSet; 204 | var teamExportText = ''; 205 | for (var i = 0; i < CURRENT_SIDEBARS[pnum - 1].length; i++) { 206 | monName = CURRENT_SIDEBARS[pnum - 1][i]; 207 | setdexName = pnum == 1 ? LEFT_SIDEBAR_NAMES[i] : RIGHT_SIDEBAR_NAMES[i]; 208 | tempSet = setdex[monName][setdexName]; 209 | tempSet.name = monName; 210 | teamExportText += exportset(tempSet) + (i != CURRENT_SIDEBARS[pnum - 1].length - 1 ? "\n" : ""); 211 | } 212 | Clipboard_CopyTo(teamExportText); 213 | } 214 | 215 | function clearSidebar(pnum) { 216 | if (confirm("Delete the " + (pnum == 1 ? "left" : pnum == 2 ? "right" : "ERROR") + " team?")) 217 | removeSidebarTeam(pnum); 218 | } 219 | 220 | function checkVisibleButtons(pnum) { 221 | var side = pnum == 1 ? 'L' : pnum == 2 ? 'R' : ''; 222 | var teamnum = CURRENT_SIDEBARS[pnum - 1].length; 223 | 224 | if (teamnum == 6) 225 | $('#sb' + side).hide(); 226 | else 227 | $('#sb' + side).show(); 228 | 229 | if (teamnum == 0) 230 | $('#ed' + side).hide(); 231 | else 232 | $('#ed' + side).show(); 233 | } -------------------------------------------------------------------------------- /script_res/damage_rse.js: -------------------------------------------------------------------------------- 1 | function CALCULATE_ALL_MOVES_ADV(p1, p2, field) { 2 | checkTrace(p1, p2); 3 | checkTrace(p2, p1); 4 | checkAirLock(p1, field); 5 | checkAirLock(p2, field); 6 | checkForecast(p1, field.getWeather()); 7 | checkForecast(p2, field.getWeather()); 8 | checkIntimidate(p1, p2); 9 | checkIntimidate(p2, p1); 10 | p1.stats[SP] = getFinalSpeed(p1, field.getWeather()); 11 | $(".p1-speed-mods").text(p1.stats[SP]); 12 | p2.stats[SP] = getFinalSpeed(p2, field.getWeather()); 13 | $(".p2-speed-mods").text(p2.stats[SP]); 14 | var side1 = field.getSide(1); 15 | var side2 = field.getSide(0); 16 | var results = [[],[]]; 17 | for (var i = 0; i < 4; i++) { 18 | results[0][i] = CALCULATE_DAMAGE_ADV(p1, p2, p1.moves[i], side1); 19 | results[1][i] = CALCULATE_DAMAGE_ADV(p2, p1, p2.moves[i], side2); 20 | } 21 | return results; 22 | } 23 | 24 | function CALCULATE_DAMAGE_ADV(attacker, defender, move, field) { 25 | var moveDescName = move.name; 26 | 27 | checkMoveTypeChange(move, field, attacker); 28 | 29 | if (move.name == "Nature Power") 30 | [move, moveDescName] = NaturePower(move, field, moveDescName); 31 | 32 | var description = { 33 | "attackerName": attacker.name, 34 | "moveName": moveDescName, 35 | "defenderName": defender.name 36 | }; 37 | 38 | addLevelDesc(attacker, defender, description); 39 | 40 | if (move.bp === 0 || move.category === "Status") { 41 | return statusMoves(move, attacker, defender, description); 42 | } 43 | 44 | var typeEffect1 = getMoveEffectiveness(move, defender.type1, defender.type2, description, field.isForesight); 45 | var typeEffect2 = defender.type2 && defender.type2 !== defender.type1 ? getMoveEffectiveness(move, defender.type2, defender.type1, description, field.isForesight) : 1; 46 | immuneBuildDesc = immunityChecks(move, attacker, defender, field, description, defender.ability, typeEffect1 * typeEffect2); 47 | if (immuneBuildDesc !== -1) return immuneBuildDesc; 48 | 49 | getHPInfo(description, defender); 50 | 51 | setDamageBuildDesc = setDamage(move, attacker, defender, description, false, field); 52 | if (setDamageBuildDesc !== -1) return setDamageBuildDesc; 53 | 54 | if (move.hitRange) { 55 | description.hits = move.hits; 56 | } 57 | 58 | var bp; 59 | [bp, description] = basePowerFunc(move, description, '', attacker, defender, field, false, false, defender.ability); 60 | 61 | var at, df; 62 | //Unlike the other gens, it's best to leave the Attack, Defense, general, and final modifiers all together. It best matches the decomp. 63 | if (move.name !== 'Beat Up') { 64 | var isPhysical = move.type === 'Typeless' ? typeChart[moves[move.name].type].category === 'Physical' : typeChart[move.type].category === "Physical"; 65 | var attackStat = isPhysical ? AT : SA; 66 | description.attackEVs = attacker.evs[attackStat] + 67 | (NATURES[attacker.nature][0] === attackStat ? "+" : NATURES[attacker.nature][1] === attackStat ? "-" : "") + " " + 68 | toSmogonStat(attackStat); 69 | var defenseStat = isPhysical ? DF : SD; 70 | description.defenseEVs = defender.evs[defenseStat] + 71 | (NATURES[defender.nature][0] === defenseStat ? "+" : NATURES[defender.nature][1] === defenseStat ? "-" : "") + " " + 72 | toSmogonStat(defenseStat); 73 | at = attacker.rawStats[attackStat]; 74 | df = defender.rawStats[defenseStat]; 75 | 76 | if (isPhysical && (attacker.ability === "Huge Power" || attacker.ability === "Pure Power")) { 77 | at *= 2; 78 | description.attackerAbility = attacker.ability; 79 | } 80 | 81 | if (getItemBoostType(attacker.item) === move.type) { 82 | if (attacker.item === "Sea Incense") 83 | at = Math.floor(at * 1.05); 84 | else 85 | at = Math.floor(at * 1.1); 86 | description.attackerItem = attacker.item; 87 | } else if ((isPhysical && attacker.item === "Choice Band") || 88 | (!isPhysical && attacker.item === "Soul Dew" && (attacker.name === "Latios" || attacker.name === "Latias"))) { 89 | at = Math.floor(at * 1.5); 90 | description.attackerItem = attacker.item; 91 | } else if ((!isPhysical && attacker.item === "DeepSeaTooth" && attacker.name === "Clamperl") || 92 | (!isPhysical && attacker.item === "Light Ball" && attacker.name === "Pikachu") || 93 | (isPhysical && attacker.item === "Thick Club" && (attacker.name === "Cubone" || attacker.name === "Marowak"))) { 94 | at *= 2; 95 | description.attackerItem = attacker.item; 96 | } 97 | 98 | if ((!isPhysical && defender.item === "Soul Dew" && (defender.name === "Latios" || defender.name === "Latias")) || 99 | (isPhysical && defender.item === "Metal Powder" && defender.name === "Ditto")) { 100 | df = Math.floor(df * 1.5); 101 | description.defenderItem = defender.item; 102 | } else if (!isPhysical && defender.item === "DeepSeaScale" && defender.name === "Clamperl") { 103 | df *= 2; 104 | description.defenderItem = defender.item; 105 | } 106 | 107 | if (defender.ability === "Thick Fat" && (move.type === "Fire" || move.type === "Ice")) { 108 | at = Math.floor(at / 2); 109 | description.defenderAbility = defender.ability; 110 | } else if (isPhysical && defender.ability === "Marvel Scale" && defender.status !== "Healthy") { 111 | df = Math.floor(df * 1.5); 112 | description.defenderAbility = defender.ability; 113 | } 114 | 115 | if ((isPhysical && (attacker.ability === "Hustle" || (attacker.ability === "Guts" && attacker.status !== "Healthy"))) 116 | || (!isPhysical && ["Plus", "Minus"].indexOf(attacker.ability) !== -1 && attacker.abilityOn)) { 117 | at = Math.floor(at * 1.5); 118 | description.attackerAbility = attacker.ability; 119 | } else if (attacker.curHP <= attacker.maxHP / 3 && 120 | ((attacker.ability === "Overgrow" && move.type === "Grass") || 121 | (attacker.ability === "Blaze" && move.type === "Fire") || 122 | (attacker.ability === "Torrent" && move.type === "Water") || 123 | (attacker.ability === "Swarm" && move.type === "Bug"))) { 124 | bp = Math.floor(bp * 1.5); 125 | description.attackerAbility = attacker.ability; 126 | } 127 | 128 | if (move.name === "Explosion" || move.name === "Self-Destruct") { 129 | df = Math.floor(df / 2); 130 | } 131 | 132 | var isCritical = critMove(move, defender.ability); 133 | 134 | var attackBoost = attacker.boosts[attackStat]; 135 | var defenseBoost = defender.boosts[defenseStat]; 136 | if (attackBoost > 0 || (!isCritical && attackBoost < 0)) { 137 | at = getModifiedStat(at, attackBoost); 138 | description.attackBoost = attackBoost; 139 | } 140 | if (defenseBoost < 0 || (!isCritical && defenseBoost > 0)) { 141 | df = getModifiedStat(df, defenseBoost); 142 | description.defenseBoost = defenseBoost; 143 | } 144 | } 145 | else { 146 | at = pokedex[attacker.name].bs.at; 147 | df = pokedex[defender.name].bs.df; 148 | } 149 | 150 | var baseDamage = Math.floor(Math.floor(Math.floor(2 * attacker.level / 5 + 2) * at * bp / df) / 50); 151 | 152 | if (attacker.status === "Burned" && isPhysical && attacker.ability !== "Guts") { 153 | baseDamage = Math.floor(baseDamage / 2); 154 | description.isBurned = true; 155 | } 156 | 157 | if (!isCritical) { 158 | var screenMultiplier = field.format !== "Singles" ? (2 / 3) : (1 / 2); 159 | if (isPhysical && field.isReflect) { 160 | baseDamage = Math.floor(baseDamage * screenMultiplier); 161 | description.isReflect = true; 162 | } else if (!isPhysical && field.isLightScreen) { 163 | baseDamage = Math.floor(baseDamage * screenMultiplier); 164 | description.isLightScreen = true; 165 | } 166 | } 167 | 168 | if (field.format !== "Singles" && move.isSpread && !move.isGen3Spread) { 169 | baseDamage = Math.floor(baseDamage * 1 / 2); 170 | } 171 | 172 | if ((field.weather === "Sun" && move.type === "Fire") || (field.weather === "Rain" && move.type === "Water")) { 173 | baseDamage = Math.floor(baseDamage * 1.5); 174 | description.weather = field.weather; 175 | } else if ((field.weather === "Sun" && move.type === "Water") || (field.weather === "Rain" && move.type === "Fire") || 176 | (move.name === "Solar Beam" && ["Rain", "Sand", "Hail"].indexOf(field.weather) !== -1)) { 177 | baseDamage = Math.floor(baseDamage / 2); 178 | description.weather = field.weather; 179 | } 180 | 181 | if (attacker.ability === "Flash Fire" && attacker.abilityOn && move.type === "Fire") { 182 | baseDamage = Math.floor(baseDamage * 1.5); 183 | description.attackerAbility = "Flash Fire"; 184 | } 185 | 186 | baseDamage = Math.max(1, baseDamage) + 2; 187 | 188 | if (isCritical) { 189 | baseDamage *= 2; 190 | description.isCritical = true; 191 | } 192 | 193 | if (field.isHelpingHand) { 194 | baseDamage = Math.floor(baseDamage * 1.5); 195 | description.isHelpingHand = true; 196 | } 197 | 198 | if (move.type === attacker.type1 || move.type === attacker.type2) { 199 | baseDamage = Math.floor(baseDamage * 1.5); 200 | } 201 | 202 | //type modifiers are calculated separately for each type 203 | baseDamage = Math.floor(baseDamage * typeEffect1); 204 | baseDamage = Math.floor(baseDamage * typeEffect2); 205 | 206 | var damage = [], additionalDamage = [], allDamage = []; 207 | for (var i = 85; i <= 100; i++) { 208 | damage[i - 85] = Math.max(1, Math.floor(baseDamage * i / 100)); 209 | } 210 | 211 | if (!move.isNextMove) { 212 | var addQualList = checkAddCalcQualifications(attacker, defender, move, field, isPhysical); 213 | var addCalcQualified = false; 214 | for (check in addQualList) { 215 | if (addQualList[check]) { 216 | addCalcQualified = true; 217 | break; 218 | } 219 | } 220 | if (addCalcQualified) { 221 | additionalDamage = additionalDamageCalcs(attacker, defender, move, field, description, addQualList); 222 | allDamage[0] = damage; 223 | } 224 | else 225 | allDamage = damage; 226 | if (additionalDamage.length) { 227 | for (var i = 0; i < additionalDamage.length; i++) { 228 | allDamage[i + 1] = additionalDamage[i]; 229 | } 230 | } 231 | } 232 | else 233 | allDamage = damage; 234 | 235 | return { "damage": allDamage, "description": buildDescription(description) }; 236 | } 237 | -------------------------------------------------------------------------------- /legacy_scripts/status_item_data.js: -------------------------------------------------------------------------------- 1 | var ITEMS_GSC = [ 2 | 'Berry', 3 | 'Berry Juice', 4 | 'Black Belt', 5 | 'BlackGlasses', 6 | 'Charcoal', 7 | 'Dragon Fang', 8 | 'Gold Berry', 9 | 'Hard Stone', 10 | 'King\'s Rock', 11 | 'Leftovers', 12 | 'Light Ball', 13 | 'Magnet', 14 | 'Metal Coat', 15 | 'Metal Powder', 16 | 'Miracle Seed', 17 | 'Mystic Water', 18 | 'NeverMeltIce', 19 | 'Pink Bow', 20 | 'Poison Barb', 21 | 'Polkadot Bow', 22 | 'Sharp Beak', 23 | 'SilverPowder', 24 | 'Soft Sand', 25 | 'Spell Tag', 26 | 'Stick', 27 | 'Thick Club', 28 | 'TwistedSpoon' 29 | ]; 30 | 31 | var ITEMS_ADV = ITEMS_GSC.concat([ 32 | 'Choice Band', 33 | 'DeepSeaScale', 34 | 'DeepSeaTooth', 35 | 'Oran Berry', 36 | 'Silk Scarf', 37 | 'Sitrus Berry', 38 | 'Soul Dew' 39 | ]); 40 | 41 | ITEMS_ADV.splice(ITEMS_ADV.indexOf('Berry'), 1); 42 | ITEMS_ADV.splice(ITEMS_ADV.indexOf('Gold Berry'), 1); 43 | ITEMS_ADV.splice(ITEMS_ADV.indexOf('Pink Bow'), 1); 44 | ITEMS_ADV.splice(ITEMS_ADV.indexOf('Polkadot Bow'), 1); 45 | 46 | var ITEMS_DPP = ITEMS_ADV.concat([ 47 | 'Adamant Orb', 48 | 'Apicot Berry', 49 | 'Babiri Berry', 50 | 'Belue Berry', 51 | 'Black Sludge', 52 | 'Charti Berry', 53 | 'Chesto Berry', 54 | 'Chilan Berry', 55 | 'Choice Scarf', 56 | 'Choice Specs', 57 | 'Chople Berry', 58 | 'Coba Berry', 59 | 'Colbur Berry', 60 | 'Custap Berry', 61 | 'Draco Plate', 62 | 'Dread Plate', 63 | 'Durin Berry', 64 | 'Earth Plate', 65 | 'Enigma Berry', 66 | 'Expert Belt', 67 | 'Fist Plate', 68 | 'Flame Orb', 69 | 'Flame Plate', 70 | 'Ganlon Berry', 71 | 'Griseous Orb', 72 | 'Haban Berry', 73 | 'Icicle Plate', 74 | 'Insect Plate', 75 | 'Iron Ball', 76 | 'Iron Plate', 77 | 'Jaboca Berry', 78 | 'Kasib Berry', 79 | 'Kebia Berry', 80 | 'Lagging Tail', 81 | 'Lansat Berry', 82 | 'Leppa Berry', 83 | 'Liechi Berry', 84 | 'Life Orb', 85 | 'Lum Berry', 86 | 'Lustrous Orb', 87 | 'Macho Brace', 88 | 'Meadow Plate', 89 | 'Micle Berry', 90 | 'Mind Plate', 91 | 'Muscle Band', 92 | 'Occa Berry', 93 | 'Odd Incense', 94 | 'Passho Berry', 95 | 'Payapa Berry', 96 | 'Petaya Berry', 97 | 'Rawst Berry', 98 | 'Razor Fang', 99 | 'Rindo Berry', 100 | 'Rock Incense', 101 | 'Rose Incense', 102 | 'Rowap Berry', 103 | 'Salac Berry', 104 | 'Sea Incense', 105 | 'Shuca Berry', 106 | 'Sky Plate', 107 | 'Splash Plate', 108 | 'Spooky Plate', 109 | 'Starf Berry', 110 | 'Stone Plate', 111 | 'Tanga Berry', 112 | 'Toxic Orb', 113 | 'Toxic Plate', 114 | 'Wacan Berry', 115 | 'Watmel Berry', 116 | 'Wave Incense', 117 | 'Wise Glasses', 118 | 'Yache Berry', 119 | 'Zap Plate' 120 | ]); 121 | 122 | var ITEMS_BW = ITEMS_DPP.concat([ 123 | 'Air Balloon', 124 | 'Bug Gem', 125 | 'Dark Gem', 126 | 'Dragon Gem', 127 | 'Electric Gem', 128 | 'Eviolite', 129 | 'Fighting Gem', 130 | 'Fire Gem', 131 | 'Flying Gem', 132 | 'Ghost Gem', 133 | 'Grass Gem', 134 | 'Ground Gem', 135 | 'Ice Gem', 136 | 'Normal Gem', 137 | 'Poison Gem', 138 | 'Psychic Gem', 139 | 'Rock Gem', 140 | 'Steel Gem', 141 | 'Water Gem' 142 | ]); 143 | 144 | var ITEMS_XY = ITEMS_BW.concat([ 145 | 'Assault Vest', 146 | 'Kee Berry', 147 | 'Maranga Berry', 148 | 'Pixie Plate', 149 | 'Roseli Berry', 150 | 'Safety Goggles' 151 | ]); 152 | 153 | ITEMS_XY.splice(ITEMS_XY.indexOf('BlackGlasses'), 1, 'Black Glasses'); 154 | ITEMS_XY.splice(ITEMS_XY.indexOf('DeepSeaScale'), 1, 'Deep Sea Scale'); 155 | ITEMS_XY.splice(ITEMS_XY.indexOf('DeepSeaTooth'), 1, 'Deep Sea Tooth'); 156 | ITEMS_XY.splice(ITEMS_XY.indexOf('NeverMeltIce'), 1, 'Never-Melt Ice'); 157 | ITEMS_XY.splice(ITEMS_XY.indexOf('SilverPowder'), 1, 'Silver Powder'); 158 | ITEMS_XY.splice(ITEMS_XY.indexOf('TwistedSpoon'), 1, 'Twisted Spoon'); 159 | ITEMS_XY.splice(ITEMS_XY.indexOf('Bug Gem'), 1); 160 | ITEMS_XY.splice(ITEMS_XY.indexOf('Dark Gem'), 1); 161 | ITEMS_XY.splice(ITEMS_XY.indexOf('Dragon Gem'), 1); 162 | ITEMS_XY.splice(ITEMS_XY.indexOf('Electric Gem'), 1); 163 | ITEMS_XY.splice(ITEMS_XY.indexOf('Fighting Gem'), 1); 164 | ITEMS_XY.splice(ITEMS_XY.indexOf('Fire Gem'), 1); 165 | ITEMS_XY.splice(ITEMS_XY.indexOf('Flying Gem'), 1); 166 | ITEMS_XY.splice(ITEMS_XY.indexOf('Ghost Gem'), 1); 167 | ITEMS_XY.splice(ITEMS_XY.indexOf('Grass Gem'), 1); 168 | ITEMS_XY.splice(ITEMS_XY.indexOf('Ground Gem'), 1); 169 | ITEMS_XY.splice(ITEMS_XY.indexOf('Ice Gem'), 1); 170 | ITEMS_XY.splice(ITEMS_XY.indexOf('Poison Gem'), 1); 171 | ITEMS_XY.splice(ITEMS_XY.indexOf('Psychic Gem'), 1); 172 | ITEMS_XY.splice(ITEMS_XY.indexOf('Rock Gem'), 1); 173 | ITEMS_XY.splice(ITEMS_XY.indexOf('Steel Gem'), 1); 174 | ITEMS_XY.splice(ITEMS_XY.indexOf('Water Gem'), 1); 175 | ITEMS_XY.splice(ITEMS_XY.indexOf('Soul Dew'), 1); 176 | 177 | 178 | var ITEMS_SM = ITEMS_XY.concat([ 179 | 'Aguav Berry', 180 | 'Figy Berry', 181 | 'Iapapa Berry', 182 | 'Mago Berry', 183 | 'Wiki Berry' 184 | ]); 185 | 186 | function getItemBoostType(item) { 187 | switch (item) { 188 | case 'Draco Plate': 189 | case 'Dragon Fang': 190 | return 'Dragon'; 191 | case 'Dread Plate': 192 | case 'BlackGlasses': 193 | case 'Black Glasses': 194 | return 'Dark'; 195 | case 'Earth Plate': 196 | case 'Soft Sand': 197 | return 'Ground'; 198 | case 'Fist Plate': 199 | case 'Black Belt': 200 | return 'Fighting'; 201 | case 'Flame Plate': 202 | case 'Charcoal': 203 | return 'Fire'; 204 | case 'Icicle Plate': 205 | case 'NeverMeltIce': 206 | case 'Never-Melt Ice': 207 | return 'Ice'; 208 | case 'Insect Plate': 209 | case 'SilverPowder': 210 | case 'Silver Powder': 211 | return 'Bug'; 212 | case 'Iron Plate': 213 | case 'Metal Coat': 214 | return 'Steel'; 215 | case 'Meadow Plate': 216 | case 'Rose Incense': 217 | case 'Miracle Seed': 218 | return 'Grass'; 219 | case 'Mind Plate': 220 | case 'Odd Incense': 221 | case 'TwistedSpoon': 222 | case 'Twisted Spoon': 223 | return 'Psychic'; 224 | case 'Pixie Plate': 225 | return 'Fairy'; 226 | case 'Sky Plate': 227 | case 'Sharp Beak': 228 | return 'Flying'; 229 | case 'Splash Plate': 230 | case 'Sea Incense': 231 | case 'Wave Incense': 232 | case 'Mystic Water': 233 | return 'Water'; 234 | case 'Spooky Plate': 235 | case 'Spell Tag': 236 | return 'Ghost'; 237 | case 'Stone Plate': 238 | case 'Rock Incense': 239 | case 'Hard Stone': 240 | return 'Rock'; 241 | case 'Toxic Plate': 242 | case 'Poison Barb': 243 | return 'Poison'; 244 | case 'Zap Plate': 245 | case 'Magnet': 246 | return 'Electric'; 247 | case 'Silk Scarf': 248 | case 'Pink Bow': 249 | case 'Polkadot Bow': 250 | return 'Normal'; 251 | default: 252 | return ''; 253 | } 254 | } 255 | 256 | function getBerryResistType(berry) { 257 | switch (berry) { 258 | case 'Chilan Berry': 259 | return 'Normal'; 260 | case 'Occa Berry': 261 | return 'Fire'; 262 | case 'Passho Berry': 263 | return 'Water'; 264 | case 'Wacan Berry': 265 | return 'Electric'; 266 | case 'Rindo Berry': 267 | return 'Grass'; 268 | case 'Yache Berry': 269 | return 'Ice'; 270 | case 'Chople Berry': 271 | return 'Fighting'; 272 | case 'Kebia Berry': 273 | return 'Poison'; 274 | case 'Shuca Berry': 275 | return 'Ground'; 276 | case 'Coba Berry': 277 | return 'Flying'; 278 | case 'Payapa Berry': 279 | return 'Psychic'; 280 | case 'Tanga Berry': 281 | return 'Bug'; 282 | case 'Charti Berry': 283 | return 'Rock'; 284 | case 'Kasib Berry': 285 | return 'Ghost'; 286 | case 'Haban Berry': 287 | return 'Dragon'; 288 | case 'Colbur Berry': 289 | return 'Dark'; 290 | case 'Babiri Berry': 291 | return 'Steel'; 292 | case 'Roseli Berry': 293 | return 'Fairy'; 294 | default: 295 | return ''; 296 | } 297 | } 298 | 299 | function getFlingPower(item) { 300 | return item === 'Iron Ball' ? 130 301 | : item === 'Hard Stone' ? 100 302 | : item.indexOf('Plate') !== -1 || ['Deep Sea Tooth','Thick Club'].indexOf(item) !== -1 ? 90 303 | : ['Assault Vest','Weakness Policy'].indexOf(item) !== -1 ? 80 304 | : ['Poison Barb','Dragon Fang'].indexOf(item) !== -1 ? 70 305 | : ['Adamant Orb','Lustrous Orb','Macho Brace','Stick'].indexOf(item) !== -1 ? 60 306 | : item === 'Sharp Beak' ? 50 307 | : item === 'Eviolite' ? 40 308 | : ['Black Belt','Black Sludge','Black Glasses','Charcoal','Deep Sea Scale','Flame Orb',"King's Rock", 309 | 'Life Orb','Light Ball','Magnet','Metal Coat','Miracle Seed','Mystic Water','Never-Melt Ice', 310 | 'Razor Fang','Soul Dew','Spell Tag','Toxic Orb','Twisted Spoon'].indexOf(item) !== -1 ? 30 311 | : 10; 312 | } 313 | 314 | function getNaturalGift(item) { 315 | var gift = { 316 | 'Apicot Berry' : {'t':'Ground','p':100}, 317 | 'Babiri Berry' : {'t':'Steel','p':80}, 318 | 'Belue Berry' : {'t':'Electric','p':100}, 319 | 'Charti Berry' : {'t':'Rock','p':80}, 320 | 'Chesto Berry' : {'t':'Water','p':80}, 321 | 'Chilan Berry' : {'t':'Normal','p':80}, 322 | 'Chople Berry' : {'t':'Fighting','p':80}, 323 | 'Coba Berry' : {'t':'Flying','p':80}, 324 | 'Colbur Berry' : {'t':'Dark','p':80}, 325 | 'Custap Berry' : {'t':'Ghost','p':100}, 326 | 'Durin Berry' : {'t':'Water','p':100}, 327 | 'Enigma Berry' : {'t':'Bug','p':100}, 328 | 'Ganlon Berry' : {'t':'Ice','p':100}, 329 | 'Haban Berry' : {'t':'Dragon','p':80}, 330 | 'Jaboca Berry' : {'t':'Dragon','p':100}, 331 | 'Kasib Berry' : {'t':'Ghost','p':80}, 332 | 'Kebia Berry' : {'t':'Poison','p':80}, 333 | 'Kee Berry' : {'t':'Fairy','p':100}, 334 | 'Lansat Berry' : {'t':'Flying','p':100}, 335 | 'Leppa Berry' : {'t':'Fighting','p':80}, 336 | 'Liechi Berry' : {'t':'Grass','p':100}, 337 | 'Lum Berry' : {'t':'Flying','p':80}, 338 | 'Maranga Berry' : {'t':'Dark','p':100}, 339 | 'Micle Berry' : {'t':'Rock','p':100}, 340 | 'Occa Berry' : {'t':'Fire','p':80}, 341 | 'Oran Berry' : {'t':'Poison','p':80}, 342 | 'Passho Berry' : {'t':'Water','p':80}, 343 | 'Payapa Berry' : {'t':'Psychic','p':80}, 344 | 'Petaya Berry' : {'t':'Poison','p':100}, 345 | 'Rawst Berry' : {'t':'Grass','p':80}, 346 | 'Rindo Berry' : {'t':'Grass','p':80}, 347 | 'Roseli Berry' : {'t':'Fairy','p':80}, 348 | 'Rowap Berry' : {'t':'Dark','p':100}, 349 | 'Salac Berry' : {'t':'Fighting','p':100}, 350 | 'Shuca Berry' : {'t':'Ground','p':80}, 351 | 'Sitrus Berry' : {'t':'Psychic','p':80}, 352 | 'Starf Berry' : {'t':'Psychic','p':100}, 353 | 'Tanga Berry' : {'t':'Bug','p':80}, 354 | 'Wacan Berry' : {'t':'Electric','p':80}, 355 | 'Watmel Berry' : {'t':'Fire','p':100}, 356 | 'Yache Berry' : {'t':'Ice','p':80} 357 | }[item]; 358 | if (gift) { 359 | if (gen < 6) { 360 | gift.p -= 20; 361 | } 362 | return gift; 363 | } 364 | return {'t':'Normal','p':1}; 365 | 366 | 367 | } 368 | -------------------------------------------------------------------------------- /script_res/setdex_boss-titan.js: -------------------------------------------------------------------------------- 1 | var SETDEX_BOSS_SV = { 2 | 'Klawf': { 3 | 'Stony Cliff Titan': { 4 | 'level': 16, 5 | 'ivs': { 6 | 'hp': 30, 7 | 'at': 30, 8 | 'df': 30, 9 | 'sa': 30, 10 | 'sd': 30, 11 | 'sp': 30 12 | }, 13 | 'nature': 'Gentle', 14 | 'ability': 'Anger Shell', 15 | 'moves': [ 16 | 'Vise Grip', 17 | 'Rock Smash', 18 | 'Rock Tomb', 19 | 'Block' 20 | ], 21 | }, 22 | }, 23 | 'Bombirdier': { 24 | 'Open Sky Titan': { 25 | 'level': 20, 26 | 'ivs': { 27 | 'hp': 30, 28 | 'at': 30, 29 | 'df': 30, 30 | 'sa': 30, 31 | 'sd': 30, 32 | 'sp': 30 33 | }, 34 | 'nature': 'Jolly', 35 | 'ability': 'Rocky Payload', 36 | 'moves': [ 37 | 'Rock Throw', 38 | 'Wing Attack', 39 | 'Pluck', 40 | 'Torment' 41 | ], 42 | }, 43 | }, 44 | 'Orthworm': { 45 | 'Lurking Steel Titan': { 46 | 'level': 29, 47 | 'ivs': { 48 | 'hp': 30, 49 | 'at': 30, 50 | 'df': 30, 51 | 'sa': 30, 52 | 'sd': 30, 53 | 'sp': 30 54 | }, 55 | 'nature': 'Quirky', 56 | 'ability': 'Earth Eater', 57 | 'moves': [ 58 | 'Iron Tail', 59 | 'Headbutt', 60 | 'Wrap', 61 | 'Sandstorm' 62 | ], 63 | }, 64 | }, 65 | 'Great Tusk': { 66 | 'Quaking Earth Titan (Scarlet)': { 67 | 'level': 45, 68 | 'ivs': { 69 | 'hp': 30, 70 | 'at': 30, 71 | 'df': 30, 72 | 'sa': 30, 73 | 'sd': 30, 74 | 'sp': 30 75 | }, 76 | 'nature': 'Naughty', 77 | 'ability': 'Protosynthesis', 78 | 'moves': [ 79 | 'Rapid Spin', 80 | 'Brick Break', 81 | 'Knock Off', 82 | 'Stomping Tantrum' 83 | ], 84 | }, 85 | }, 86 | 'Iron Treads': { 87 | 'Quaking Earth Titan (Violet)': { 88 | 'level': 45, 89 | 'ivs': { 90 | 'hp': 30, 91 | 'at': 30, 92 | 'df': 30, 93 | 'sa': 30, 94 | 'sd': 30, 95 | 'sp': 30 96 | }, 97 | 'nature': 'Naughty', 98 | 'ability': 'Quark Drive', 99 | 'moves': [ 100 | 'Rapid Spin', 101 | 'Iron Head', 102 | 'Knock Off', 103 | 'Stomping Tantrum' 104 | ], 105 | }, 106 | }, 107 | 'Dondozo': { 108 | 'False Dragon Titan': { 109 | 'level': 56, 110 | 'ivs': { 111 | 'hp': 30, 112 | 'at': 30, 113 | 'df': 30, 114 | 'sa': 30, 115 | 'sd': 30, 116 | 'sp': 30 117 | }, 118 | 'ability': 'Oblivious', 119 | 'moves': [ 120 | 'Aqua Tail', 121 | 'Body Slam', 122 | 'Water Pulse', 123 | 'Order Up' 124 | ], 125 | }, 126 | }, 127 | 'Tatsugiri': { 128 | 'True Dragon Titan': { 129 | 'level': 57, 130 | 'ivs': { 131 | 'hp': 30, 132 | 'at': 30, 133 | 'df': 30, 134 | 'sa': 30, 135 | 'sd': 30, 136 | 'sp': 30 137 | }, 138 | 'nature': 'Quiet', 139 | 'ability': 'Commander', 140 | 'moves': [ 141 | 'Muddy Water', 142 | 'Icy Wind', 143 | 'Taunt', 144 | 'Dragon Pulse' 145 | ], 146 | }, 147 | }, 148 | 'Okidogi': { 149 | 'Titanic Okidogi (Before Credits)': { 150 | 'level': 35, 151 | 'ivs': { 152 | 'hp': 30, 153 | 'at': 30, 154 | 'df': 30, 155 | 'sa': 30, 156 | 'sd': 30, 157 | 'sp': 30 158 | }, 159 | 'ability': 'Toxic Chain', 160 | 'moves': [ 161 | 'Bite', 162 | 'Poison Fang', 163 | 'Low Kick', 164 | 'Brutal Swing' 165 | ], 166 | }, 167 | 'Titanic Okidogi (Post Credits)': { 168 | 'level': 85, 169 | 'ivs': { 170 | 'hp': 30, 171 | 'at': 30, 172 | 'df': 30, 173 | 'sa': 30, 174 | 'sd': 30, 175 | 'sp': 30 176 | }, 177 | 'ability': 'Toxic Chain', 178 | 'item': 'Liechi Berry', 179 | 'moves': [ 180 | 'Crunch', 181 | 'Close Combat', 182 | 'Poison Jab', 183 | 'Brutal Swing' 184 | ], 185 | }, 186 | }, 187 | 'Munkidori': { 188 | 'Titanic Munkidori (Before Credits)': { 189 | 'level': 35, 190 | 'ivs': { 191 | 'hp': 30, 192 | 'at': 30, 193 | 'df': 30, 194 | 'sa': 30, 195 | 'sd': 30, 196 | 'sp': 30 197 | }, 198 | 'ability': 'Toxic Chain', 199 | 'moves': [ 200 | 'Confusion', 201 | 'Clear Smog', 202 | 'Psybeam', 203 | 'Spite' 204 | ], 205 | }, 206 | 'Titanic Munkidori (Post Credits)': { 207 | 'level': 85, 208 | 'ivs': { 209 | 'hp': 30, 210 | 'at': 30, 211 | 'df': 30, 212 | 'sa': 30, 213 | 'sd': 30, 214 | 'sp': 30 215 | }, 216 | 'ability': 'Toxic Chain', 217 | 'moves': [ 218 | 'Psychic', 219 | 'Sludge Wave', 220 | 'Shadow Ball', 221 | 'Nasty Plot' 222 | ], 223 | }, 224 | }, 225 | 'Fezandipiti': { 226 | 'Titanic Fezandipiti (Before Credits)': { 227 | 'level': 35, 228 | 'ivs': { 229 | 'hp': 30, 230 | 'at': 30, 231 | 'df': 30, 232 | 'sa': 30, 233 | 'sd': 30, 234 | 'sp': 30 235 | }, 236 | 'ability': 'Toxic Chain', 237 | 'moves': [ 238 | 'Quick Attack', 239 | 'Wing Attack', 240 | 'Poison Jab', 241 | 'Dazzling Gleam' 242 | ], 243 | }, 244 | 'Titanic Fezandipiti (Post Credits)': { 245 | 'level': 85, 246 | 'ivs': { 247 | 'hp': 30, 248 | 'at': 30, 249 | 'df': 30, 250 | 'sa': 30, 251 | 'sd': 30, 252 | 'sp': 30 253 | }, 254 | 'ability': 'Toxic Chain', 255 | 'moves': [ 256 | 'Cross Poison', 257 | 'Play Rough', 258 | 'Dual Wingbeat', 259 | 'Dazzling Gleam' 260 | ], 261 | }, 262 | }, 263 | 'Ogerpon': { 264 | 'Teal Boss (Before Credits)': { 265 | 'level': 20, 266 | 'ivs': { 267 | 'hp': 31, 268 | 'at': 31, 269 | 'df': 20, 270 | 'sa': 20, 271 | 'sd': 20, 272 | 'sp': 31 273 | }, 274 | 'nature': 'Lonely', 275 | 'ability': 'Defiant', 276 | 'moves': [ 277 | 'Ivy Cudgel', 278 | 'Slam', 279 | 'Growth', 280 | 'Vine Whip' 281 | ], 282 | }, 283 | 'Teal Boss (Post Credits)': { 284 | 'level': 70, 285 | 'ivs': { 286 | 'hp': 31, 287 | 'at': 31, 288 | 'df': 20, 289 | 'sa': 20, 290 | 'sd': 20, 291 | 'sp': 31 292 | }, 293 | 'nature': 'Lonely', 294 | 'ability': 'Defiant', 295 | 'moves': [ 296 | 'Ivy Cudgel', 297 | 'Slam', 298 | 'Low Kick', 299 | 'Grassy Terrain' 300 | ], 301 | }, 302 | }, 303 | 'Ogerpon-Hearthflame': { 304 | 'Hearthflame Boss (Before Credits)': { 305 | 'level': 20, 306 | 'ivs': { 307 | 'hp': 31, 308 | 'at': 31, 309 | 'df': 20, 310 | 'sa': 20, 311 | 'sd': 20, 312 | 'sp': 31 313 | }, 314 | 'nature': 'Lonely', 315 | 'ability': 'Mold Breaker', 316 | 'moves': [ 317 | 'Ivy Cudgel', 318 | 'Slam', 319 | 'Growth', 320 | 'Vine Whip' 321 | ], 322 | }, 323 | 'Hearthflame Boss (Post Credits)': { 324 | 'level': 70, 325 | 'ivs': { 326 | 'hp': 31, 327 | 'at': 31, 328 | 'df': 20, 329 | 'sa': 20, 330 | 'sd': 20, 331 | 'sp': 31 332 | }, 333 | 'nature': 'Lonely', 334 | 'ability': 'Mold Breaker', 335 | 'moves': [ 336 | 'Ivy Cudgel', 337 | 'Slam', 338 | 'Low Kick', 339 | 'Grassy Terrain' 340 | ], 341 | }, 342 | }, 343 | 'Ogerpon-Wellspring': { 344 | 'Wellspring Boss (Before Credits)': { 345 | 'level': 20, 346 | 'ivs': { 347 | 'hp': 31, 348 | 'at': 31, 349 | 'df': 20, 350 | 'sa': 20, 351 | 'sd': 20, 352 | 'sp': 31 353 | }, 354 | 'nature': 'Lonely', 355 | 'ability': 'Water Absorb', 356 | 'moves': [ 357 | 'Ivy Cudgel', 358 | 'Slam', 359 | 'Growth', 360 | 'Vine Whip' 361 | ], 362 | }, 363 | 'Wellspring Boss (Post Credits)': { 364 | 'level': 70, 365 | 'ivs': { 366 | 'hp': 31, 367 | 'at': 31, 368 | 'df': 20, 369 | 'sa': 20, 370 | 'sd': 20, 371 | 'sp': 31 372 | }, 373 | 'nature': 'Lonely', 374 | 'ability': 'Water Absorb', 375 | 'moves': [ 376 | 'Ivy Cudgel', 377 | 'Slam', 378 | 'Low Kick', 379 | 'Grassy Terrain' 380 | ], 381 | }, 382 | }, 383 | 'Ogerpon-Cornerstone': { 384 | 'Cornerstone Boss (Before Credits)': { 385 | 'level': 20, 386 | 'ivs': { 387 | 'hp': 31, 388 | 'at': 31, 389 | 'df': 20, 390 | 'sa': 20, 391 | 'sd': 20, 392 | 'sp': 31 393 | }, 394 | 'nature': 'Lonely', 395 | 'ability': 'Sturdy', 396 | 'moves': [ 397 | 'Ivy Cudgel', 398 | 'Slam', 399 | 'Growth', 400 | 'Vine Whip' 401 | ], 402 | }, 403 | 'Cornerstone Boss (Post Credits)': { 404 | 'level': 70, 405 | 'ivs': { 406 | 'hp': 31, 407 | 'at': 31, 408 | 'df': 20, 409 | 'sa': 20, 410 | 'sd': 20, 411 | 'sp': 31 412 | }, 413 | 'nature': 'Lonely', 414 | 'ability': 'Sturdy', 415 | 'moves': [ 416 | 'Ivy Cudgel', 417 | 'Slam', 418 | 'Low Kick', 419 | 'Grassy Terrain' 420 | ], 421 | }, 422 | }, 423 | 'Ursaluna-Bloodmoon': { 424 | 'Bloodmoon Beast (min Atk & Spe)': { 425 | 'level': 70, 426 | 'ivs': { 427 | 'at': 0, 428 | 'sp': 0 429 | }, 430 | 'ability': "Mind's Eye", 431 | 'moves': [ 432 | 'Blood Moon', 433 | 'Earth Power', 434 | 'Slash', 435 | 'Calm Mind' 436 | ], 437 | } 438 | } 439 | }; --------------------------------------------------------------------------------