class DiNothing(Skill):
# this skill does absolutely nothing
def __init__(self):
super().__init__()
class AHReequip(Skill):
# equips a skill as needed
def __init__(self, brain:Brain):
super().__init__()
self.set_skill_type(2)
self.brain = brain...
class DiNothing(Skill):
# this skill does absolutely nothing
def __init__(self):
super().__init__()
class AHReequip(Skill):
# equips a skill as needed
def __init__(self, brain:Brain):
super().__init__()
self.set_skill_type(2)
self.brain = brain...
import re
def make_extractor(pattern_str):
# Escape the whole string so regex metacharacters donβt break it
escaped = re.escape(pattern_str)
# Replace the escaped 'fudge' with a capture group
regex_str = escaped.replace(r"fudge", r"(.*)")
return re.compile(regex_str)
s =...