Open kd8qdz opened 6 years ago
That is no longer a problem: http://rogueliketutorials.com/tutorials/tcod/part-9/ sets previous_ai in the ConfusedMonster.__init__
:
class ConfusedMonster:
def __init__(self, previous_ai, number_of_turns=10):
self.previous_ai = previous_ai
self.number_of_turns = number_of_turns
and then when the component is created, the old entity.ai is passed as the argument
confused_ai = ConfusedMonster(entity.ai, 10)
confused_ai.owner = entity
entity.ai = confused_ai
causing a crash when the confuse spell expires.