Widget:Summon Simulator/20160909

<!doctype html> FFBE Gacha Simulator - exviuswiki.com     /**        * FFBE Gacha Simulator v0.1 *        * https://exviuswiki.com *        * Fencer, Juggler, Thief Banner */

var banner_rate = [ // offbanner - 90% ['3_common',       62], ['3_rare',         13], ['4_common',       10.5], ['4_rare',         3.5], ['5_rare',         1],

// featured - 10% ['4_rare_ft',      9], ['5_rare_ft',      1] ];

var guarantee_rate = [ // offbanner - 90% ['4_common',       66.75], ['4_rare',         22.25], ['5_rare',         1],

// featured - 10% ['4_rare_ft',      9], ['5_rare_ft',      1] ];

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

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

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

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

var units = [ {               name: 'Fencer', featured: true, type: 'rare', base: 4, awakened: false, three_stars: false, four_stars: true, five_stars: true },           {                name: 'Juggler', featured: true, type: 'rare', base: 4, awakened: false, three_stars: false, four_stars: true, five_stars: true },           {                name: 'Thief', featured: true, type: 'rare', base: 4, awakened: false, three_stars: false, 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...