Your weapon.attacks
method doesn't have an explicit return value, so it returns None
. When you call print(equipment["weapon"].attacks())
you're printing out the return value, which is None
. Either change the method to return the "your " + self.name + " blocked " + str(self.attack) + "\n"
string, and then print it, or just call the method and let it do the printing, without printing the return value.
Basically change your last line to this:
#print(equipment["weapon"].attacks())
equipment["weapon"].attacks()