def line(self, text): m = Armors._std_re.match(text) if (m and m.group(1) == 'ring'): self.maybe_ring = 1 elif (not m and self.maybe_ring): # workaround since the number of lines can be +1 for two rings self.expects = self.expects + 1 self.maybe_ring = 0 return Catcher.line(self, text)