Results 1 to 4 of 4

Thread: I got wrong destructionPercentage in CWL team size 30v30

  1. #1

    I got wrong destructionPercentage in CWL team size 30v30

    In the war which just ended yesterday, my clan got the destructionPercentage of 53.10% and the opposite got 71.67%. But I received the result of 37.04% and 50% from API. Other informations I got are correct, such as stars we got and personal combat gains.

    You can refer here:
    https://api.clashofclans.com/clanwarleagues/wars/%232P8UGP9JP
    My clan is in the second position.
    The result in game: IMG_20190406_154234.jpg
    Last edited by ZLeeee; September 25th, 2019 at 11:34 AM.

  2. #2

    Join Date
    Sep 2014
    Location
    Digging another tunnel in the data mine
    Posts
    6,671
    The destruction percentage is wrong for all CWL wars. It shows the value which is obtained by dividing destruction done by the weekly roster size, not the daily roster. So it will only be correct if a clan entered exactly 30 for the week.

    To get the actual war destruction you'll need to add up all the individual best-attacks
    Various data posts: Who plays what? CWL data 1 (stars), 2 (3* rates), 3 (rosters), 4 (start times and other) Data at end of old Legends And (non-data) how max bases are ordered in war
    --------------------
    Forum cup organiser. The forum cup discord server is: https://discord.gg/KEUxV2e

  3. #3
    Fresh Spawn
    Join Date
    Aug 2019
    Posts
    1
    Thanks for answering this. The number seemed pretty arbitrary. So whats happening is all the damage is being added up but instead of being divided by 15 (or 30) map positions it's being divided by however many clan members you actually brought to the CWL( say 30, 42, 50). The solution then is to total up ALL the damage (1000 something percent) and divide by 15 or 30.

    EDIT: A good way to think of this is that in a 15v CWL each base is worth 6.67 points (100 total). Each player that earns 100% earns the clan 6.67 points towards the total damage percentage. Thus, earning 90% is worth 6.0 points, 80% 5.33, 50%, 3.33, etc.

    Where it gets tricky is if a base is attacked twice. In that case the 2nd attacker only earns the DIFFERENCE in points. Lets say the first attacker got 80%, 5.33pts. And the second attacker earned 100%, 6.67pts. The 2nd attacker only adds the DIFFERENCE to the total, 1.33 points

    First Attacker 80% 5.3333
    Second Attacker 100% 6.6667
    +1.3333

    Or to say it more simply, only the best of the two attacks would count towards the total. If its coming down to a tie attacking unattacked bases is the better strategy.

    What I need to figure out next is what happens in a situation where someone got a 1☆ 99% and the 2nd person got a 2☆ 51%. I'm fairly certain that the 2☆ lower percent replaces the higher damage 1☆ in the total.
    Last edited by spencemw; 3 Weeks Ago at 04:09 PM.

  4. #4

    Join Date
    Sep 2014
    Location
    Digging another tunnel in the data mine
    Posts
    6,671
    Quote Originally Posted by spencemw View Post
    What I need to figure out next is what happens in a situation where someone got a 1☆ 99% and the 2nd person got a 2☆ 51%. I'm fairly certain that the 2☆ lower percent replaces the higher damage 1☆ in the total.
    Yes, only the best attack (ie the 2*) is counted, and the 99% 1* is totally ignored.

    BUT - I don't think you should need to do this. In the clan members, add up the bestOpponentAttack instead:
    "members": [
    {
    "tag": "#9V2J0C0C0",
    "name": "弑魂 送葬天使",
    "townhallLevel": 10,
    "mapPosition": 12,
    "attacks": [
    {
    "attackerTag": "#9V2J0C0C0",
    "defenderTag": "#8R8LVV0CQ",
    "stars": 3,
    "destructionPercentage": 100,
    "order": 16
    }
    ],
    "opponentAttacks": 1,
    "bestOpponentAttack": {
    "attackerTag": "#80J088V82",
    "defenderTag": "#9V2J0C0C0",
    "stars": 1,
    "destructionPercentage": 59,
    "order": 21
    }

    },
    and there will only ever be one per base.
    Last edited by OnyxDS; 3 Weeks Ago at 05:21 PM.
    Various data posts: Who plays what? CWL data 1 (stars), 2 (3* rates), 3 (rosters), 4 (start times and other) Data at end of old Legends And (non-data) how max bases are ordered in war
    --------------------
    Forum cup organiser. The forum cup discord server is: https://discord.gg/KEUxV2e

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •