Widget:Summon Simulator/20160923

<!doctype html> FFBE Gacha Simulator - exviuswiki.com     /**        * FFBE Gacha Simulator v0.1 *        * https://exviuswiki.com *        * Lightning, Ludmille, Charlotte Banner */

var banner_rate = [ // offbanner - 72.5% ['3_common',       50], ['3_rare',         9], ['4_common',       11], ['4_rare',         2.2], ['5_rare',         0.3],

// featured - 27.5% ['3_rare_ft',      20], ['4_rare_ft',      6.8], ['5_rare_ft',      0.7] ];

var guarantee_rate = [ // offbanner - 90% ['4_common',       71], ['4_rare',         15.5], ['5_rare',         3.5],

// featured - 10% ['4_rare_ft',      8.5], ['5_rare_ft',      1.5] ];

var type_4 = [ ['base_3',         80], ['base_4',         20] ];

var type_5 = [ ['base_3',         80], ['base_4',         20] ];

var type_4_ft = [ ['base_3',         100], ['base_4',         0] ];

var type_5_ft = [ ['base_3',         30], ['base_4',         0], ['base_5',         70] ];

var units = [ {               name: 'Lightning', featured: true, type: 'rare', base: 5, awakened: false, three_stars: false, four_stars: false, five_stars: true },           {                name: 'Ludmille', featured: true, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Charlotte', featured: true, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Garnet', featured: false, type: 'rare', base: 4, awakened: false, three_stars: false, four_stars: true, five_stars: true },           {                name: 'Freya', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Amarant', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Lenna', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Warrior of Light', featured: false, type: 'rare', base: 4, awakened: false, three_stars: false, four_stars: true, five_stars: true },           {                name: 'Tellah', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Hayate', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Locke', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Artemios', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Kefka', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Golbez', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Chizuru', featured: false, type: 'rare', base: 4, awakened: false, three_stars: false, four_stars: true, five_stars: true },           {                name: 'Gilbert', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Celes', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Xiao', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Leo', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Rakshasa', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Miyuki', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Medius', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Roselia', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Cerius', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Duane', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Vaan', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Zidane', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Firion', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Bartz', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Terra', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Cecil', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Cloud of Darkness', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Kuja', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Exdeath', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Garland', featured: false, type: 'rare', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: true },           {                name: 'Lani', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Galuf', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Russell', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Bedile', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Luna', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Anzelm', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Clyne', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Cyan', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Rydia', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Shantotto', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Fran', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Edgar', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Kain', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Krile', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Shadow', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Sabin', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Maria', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Penelo', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false },           {                name: 'Vivi', featured: false, type: 'common', base: 3, awakened: false, three_stars: true, four_stars: true, five_stars: false }       ];

function arrayColumn(arr, n) { return arr.map(x=> x[n]); }

function summon(num) { $('.gacha-result').text("");

$('.loading img').attr("src", "").attr("src", $('.loading img').data("src")); $('.loading').show;

var wikitext = ' ';

$.ajax({               url: "https://exviuswiki.com/api.php?action=parse&format=json&prop=text&contentmodel=wikitext&text=" + wikitext,                dataType: "json"            }) .done(function( data ) {               result = data.parse.text["*"];                result = result.replace(/3_star/g, "  &#9733;&#9733;&#9733;  ");                result = result.replace(/4_star/g, "  &#9733;&#9733;&#9733;&#9733;  ");                result = result.replace(/5_star/g, "  &#9733; &#9733; &#9733; &#9733; &#9733;  ");                $('.gacha-result').html(result);

$('.loading img').attr("src", ""); $('.loading').hide; });       }        Summon (1)         Summon (3)         Summon (10+1)                 Loading...