Page 1 of 1

[Fixed] Poland Special dynasty

Posted: July 4th, 2025, 5:09 pm
by matchpoint326
War: 3 books if not defeated

I got 3 food instead :)

Re: Poland Special dynasty

Posted: July 4th, 2025, 10:06 pm
by Logitude
Classic copy-pasta.

And you actually got 2 food. The log says 3.

I will fix this soon, but the electricity is out at my house currently.

What I mean by “copy-pasta” is I copy-pasted some similar code and then didn’t update the copy completely. Here is what is currently checked in:

Code: Select all

class PolandSpecial(Special):
    """War: +3 [Books] if you are not defeated"""
    name = 'Poland Special'
    abbr = 'Pl_S'

    def assign_owner(self, player):
        super().assign_owner(player)
        self.register_for_event('not defeated', self.owned, self.gain_books)

    def gain_books(self, player, **kwargs):
        self.match.log(f'[{self}] {player} gains 3 [Food].')
        player.resources[Resource.FOOD] += 2
And here is what it should be, with the last two lines fixed:

Code: Select all

class PolandSpecial(Special):
    """War: +3 [Books] if you are not defeated"""
    name = 'Poland Special'
    abbr = 'Pl_S'

    def assign_owner(self, player):
        super().assign_owner(player)
        self.register_for_event('not defeated', self.owned, self.gain_books)

    def gain_books(self, player, **kwargs):
        self.match.log(f'[{self}] {player} gains 3 [Books].')
        player.resources[Resource.BOOKS] += 3
It’s quite possible I coded this card right before running to the bathroom, or otherwise being distracted. Maybe I’ll blame it on one of my cats.

Re: Poland Special dynasty

Posted: July 4th, 2025, 10:42 pm
by Logitude
Fixed.