coc.py icon indicating copy to clipboard operation
coc.py copied to clipboard

war clan returning double the attacks in cwl

Open Westo48 opened this issue 3 years ago • 2 comments

https://github.com/mathsman5133/coc.py/blob/3b803a9c142d7554675418a6df6436dca90c5a05/coc/war_clans.py#L107

currently hardcoded to multiply attacks by two (normal wars) should be self._war.team_size * self._war.attacks_per_member

Westo48 avatar Jan 12 '22 04:01 Westo48

@mathsman5133 i think change is causing a type error due to commit b54dabea48ca9b842bf6f24da86159e59aa37e93 "move attacks_per_member after opponent loading"

Is there a specific reason the attacks_per_member was changed to loading after opponent?

Westo48 avatar Jan 12 '22 05:01 Westo48

since loading attacks_per_member after war clans:

    if self._war.is_cwl:
        self.total_attacks: int = self._war.team_size * 1
    else:
        self.total_attacks: int = self._war.team_size * 2 

will test on upcoming CWL

Westo48 avatar Feb 15 '22 15:02 Westo48

Thank you for your contribution. This has been merged in the latest update candidate

majordoobie avatar Dec 15 '22 16:12 majordoobie