function hasWeapon(wName) { for (temp.w: player.weapons) if (w.name == wName) return true; return false; }