I’m having an issue with Munchkin Swarm. Presently I’m using Python to code it and here is my code:
enemy = self.findNearestEnemy()
loop:
if self.distanceTo(enemy) < 10:
if self.isReady("cleave"):
self.cleave(enemy)
else:
self.attack("Chest")
else:
self.attack("Chest")
Simple Code
enemy = self.findNearestEnemy()
loop:
if self.distanceTo(enemy) < 7:
self.cleave(enemy)
else:
self.attack("Chest")
I have attempted this code in simpler terms and it comes to the same effect. When the code runs it usually gets stuck at “self.cleave”. This code seems to cycle back through the “self.cleave” too soon. If I change the value for the distance it then doesn’t go off at all if it is below 6. The best time I seem to have gotten is 34.7 which looks to be 3/4 complete since it is the 2nd wave that kills me. Not sure what I’m doing wrong.