Wave Image















  • War Board

    war team sizes
    Note 56 of 58 · by Razan · 13-Apr-2009 1:30pm
    I addressed this (good or bad, you be the judge) in twars with this code: * the key of the mapping is the # of players IN THE WHOLE WAR * and the value for that key is an array of the possible NUMBER OF * TEAMS for that war. * Example: 5 : ({ 3, 2 }) * in 5 player wars there can be 3 or 2 teams - 3 teams would be * 2v2v1, 2 teams would be 2v3. */ static mapping war_team_sizes = ([ 4 : ({ 2 }), 5 : ({ 3 }), 6 : ({ 2, 3 }), 7 : ({ 2, 4 }), 8 : ({ 2, 4 }), 9 : ({ 2, 3 }), 10 : ({ 2, 3, 4, 5 }), 11 : ({ 2, 3, 5 }), 12 : ({ 2, 3, 4, 6 }), 13 : ({ 2, 3, 4, 6 }), 14 : ({ 2, 3, 5, 7 }), 15 : ({ 3, 5 }), 16 : ({ 3, 5 }), 17 : ({ 3, 4, 5 }), 18 : ({ 3, 4, 6 }), ]); The 'key' (left side for you code challenged) is the number of players (heros in the case of all-19-wars) and the mapping defines a set of possible number of teams - it randomly picks one. So for example in a 8 player war it can either be a 4v4 or 2v2v2v2 but not a 3 team war. This add(s/ed) some fun variability. A 2v2v2v2 is very different than a 4v4.