hey guys, so i’m at summit’s gate for 2 weeks now,. quite a difficult one…
anyways, i have this issue, that the warlocks put my troops against me, and it breaks the code (that’s my interpretation), here’s a screenshot, any way around it?
You could do as Msakr suggested, and say if (paladin.team === "humans") {. Alternatively, this.findByType has an optional argument that filters by team. It works like this:
var paladins = this.findByType("paladin", this.findFriends());